What is the difference between git and svn? (This is part of the official argument)
SVN is a centralized version control system, the repository is centrally placed on the central server, centralized version control system must be networked to work. Sun up must be present before the code is submitted, or someone else's code might be flushed out.
Git is a distributed version control system that builds its own branch development directly locally, reducing unnecessary conflicts.
git commands (these commands are the ones I use more in my work)
git clone + git address//clone code to local
git check out master//Pull Skeleton Latest code
Git pull//get the latest code
git checkout-b dev//Create branch Dev
Submit Code
git add->git commit-m "Modify point description"->git push
Merging branches
git pull//Merge
Git fetch//does not merge
When pulling, you need to save the local changes:
Stash Save->pull->stash Pop
Discard Local Modifications: revert->pull
git diff//view changes to tracked files
Git status//View all modified files in the workspace
If you want to see a more comprehensive command , you can refer to: http://www.cnblogs.com/vman/articles/Git_cmds.html
Self summary of the four Git code steps (general code, I use the client, the client feels that four is enough)
Commit->fetch->rebase->push
Explanation: Commit: Upload your locally modified files to the local code base first;
Fetch: Pulls up the latest code on the library, but does not overwrite the local;
Rebase: Compare the code on the local library with the differences on the library, conflict resolution conflict;
Push: no conflict, upload directly to the remote repository.
GitHub Upload Code Summary