Merging branches, plus the--NO-FF parameter can be combined with normal mode, the merged history has branches, can be seen
There have been mergers, and fast forward merge doesn't look like a merger.
Git also provides a stash feature that allows you to "store" your current work site and continue working after you resume the site:
Git stash the job site and now sees the contents of the current branch
Git stash list to see where stash is stored
Git stash apply recovery, but after recovery, stash content is not deleted
Git stash pop recovery at the same time the stash content also deleted the recommended use
When adding a new feature, you certainly don't want to mess up the main branch because of some experimental code, so,
Each time a new feature is added, it is best to create a new feature branch on top, complete, merge, and finally delete the feature branch.
Git checkout-b feature-vulcan
When you clone from a remote repository, actually git automatically corresponds to the local master branch and the remote Master branch, and the remote repository
The default name is origin.
Git Remote to view information
Git remote-v Show more detailed information
The push branch pushes all local commits on that branch to the remote library. When you push, you specify a local branch so that Git takes the branch
push to remote corresponding remote branch:
Git push Origin Master
Git push Origin Dev
Master Branch, so always synchronize with remote
The Dev Branch is a development branch and all members of the team need to work on it, so they also need to synchronize with the remote
Bug branches are only used to fix bugs locally, there is no need to push to remote.
Whether or not the feature branch is pushed to the remote depends on whether you are working with your little partner to develop it.
The working mode of multi-person collaboration is usually this:
1. First, you can try to push your own changes with GIT push origin branch-name
2, if the push fails, because the remote branch than your local update, you need to first use git pull to try to merge
3. If there is a conflict in the merger, resolve the conflict and submit it locally;
4, no conflict or resolve the conflict, and then use GIT push Origin branch-name push will be successful
If Git pull hints "No tracking information", then the connection between the local branch and the remote branch
Relationship not created, with command
Git branch--set-upstream branch-name origin/branch-name
Tag is a meaningful name to remember, tied to a commit
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.