git repository to create and use a basic

Create a git user
useradd git
passwd git
Create a directory
mkdir /home/git/repos/app.git/ -p
Initialization directory
cd /home/git/repos/app.git/
git --bare init
Change app.git permission to host the git user
chown -R git.git app.git
Under other hosts clone app.git
git clone [email protected]: /home/git/repos/app.git
Creating index.html file in a directory other hosts
First submitted to a local warehouse
git add .
View submission status
git status
The revised added to the buffer zone
git add <filename>
git add *
Commit changes
git commit -m "submit information"
Pushed to the remote repository
git push origin master
git remote add origin <server>

Guess you like

Origin www.cnblogs.com/xiongyoutom/p/12449113.html