Recently doing project, using git, so write it down to summarize.
git clone, add and commit don't say anything ...
The main thing about remote-side warehouses.
First, you get something from the master branch on the remote library first:
Git fetch Origin Master
Origin is the remote repository default name, and if you re-fetch the remote repository name at remote Add, use your own name, and master is the remote branch name.
This is just the equivalent of copying the code from the remote library to local, there is no local merge, which is why not pull directly, because the first fetch and then merge we can first look at the things pulled down, and then decide whether to merge.
If you want to see what's the difference between a local branch and what you just copied, use Origin/master:
diff Yourlocalbranch Oringin/master
Down is on the current branch, merging Origin/master, it is necessary to use the merge:
git merge Oringin/master
You can also use:
Git rebase origin/master
If there is a conflict, then resolve the conflict, then commit. If it's not going to work out, you can recover:
git reset Merge
If you want to view remote library information:
Git remote-v
The proxy for Git fetch if you need to set:
git config--global http.proxy http://proxyadress
Sometimes there will be a change of permissions due to chmod and so on, causing a pile of files to become modified, what old mode, new mode, and so on, run:
False
There is also if you add a remote branch, but git branch-a and can not see, how to do? Run:
git Remote update
That's it! will continue to add slowly in the future
Git usage Tips: Fetch, merge, remote