Versioning git

Git is the world's most advanced distributed version control system.

The main steps git

git.init initialization file to the appropriate folder view after a successful show is not much of a git text (repository)

 Command 1. git config --global user.name "git your name."
 Command 2. git config --global user.email "git verify your mailbox."
 
How to submit documents to git server
1. Open the Git Bash
git add filename
 
2. to submit documents to the repository
git commit -m 'submission time Remarks'
 
3.git status
git diff
git log (change log)
git reset --hard HEAD ^ back to the previous version
 
4. Delete
1. git add command  
Command 2. git commit -m 'Remarks'
3. rm b.txt this command is to delete the file command b
 
5. Connect the local repository and push their own libraries to the server to go.
 
Remote command git the Add Origin 1.  https://github.com/ your account / your project name called
Command 2. git push -u origin master will be pushed to master the local library branch (that is pushed to the server)
On the server to see if the push was successful. 
From now on, just git push origin master can now push the machine over.
Data from the server got me, git clone 
 
1. git clone command
The data server over cloning.
After cloning can upload files directly to the current project, you can directly git push
 
If you enter the Add Remote Origin git $  [email protected] : djqiang (GitHub account name) / gitdemo (project name) .git
    Tip error message: fatal: remote origin already exists.
    Solution is as follows:
    1, first enter the $ git remote rm origin
    2, then enter the Add Remote Origin git $  [email protected] : djqiang / gitdemo.git would not have given up!
 

Guess you like

Origin www.cnblogs.com/1179929172-zh/p/11525393.html
Git