Master Branch and Dev branch already on GitHubOn a localgit checkout-b dev new and switch to local dev branchGit pull Origin dev local branch associated with remote branch========================================================================================================
One, view remote branch
Use the following git command to view all remote branches:
Git branch-r1
Two, pull remote branch and create local branch
Method One
Use the following command:
git
1, create a new branch from an existing branch (such as from the Master branch), create a dev branchgit checkout-b Dev2, can be viewed once created, branch has switched to DevGit branch* DevMaster3, submit the
:
git checkout-b release-1.2 Develop
After confirming that there are no problems, merge to the Master branch:
git checkout Master
git merge--no-ff release-1.2
# Make a label for the new node of the m
:
git checkout-b release-1.2 Develop
After confirming that there are no problems, merge to the Master branch:
git checkout Master
git merge--no-ff release-1.2
# Make a label for the new node of the m
Some mistakes may occur during git usage.
For example, execute checkout-F, reset-hard, or branch-D to delete a branch.
As a result, the local (remote) branch or some commit is lost.
At this time, we can use reflog to restore the service, provided that the lost branch or c
init, Git creates a "master" branch for you by default.
If we want to manually create a branch and switch the past. Execute Git branch (branchname).
$ git branch testing
$
Why should there be branches, there are branches so that many people can be more efficient development. View branches, branch list
$ git Branch
* Master
administrator@young-pc MINGW64 ~/helloworld (Master)
There is only one branch, and then there is a * number in front of master, which represents the current
-because your work is scattered across the pipeline, and the changes in each branch are related to its target characteristics, and things like browsing the code become easier. You can keep the changes you make in the feature branch for a few minutes, a few days or even months, and then merge them when they mature, without caring about the order or the progress th
Tag: git 1. Background When I first used GitHub, I asked my roommates what Branch was in git. He gave me a straightforward explanation and I still remember it. "Branch means that you can build a branch by yourself without affecting the entire project ".
About the remote branch-My understanding: The remote branch is always the latest version of the store.If the remote branch has been modified by someone else and its version is higher than the local version, you need to pull the remote branch down before merging and modifying the push to the remote branch.NoteUsing
Http://think-like-a-git.net/sections/rebase-from-the-ground-up/cherry-picking-explained.htmlGit ' s own online help have a great, if characteristically terse, description of the command does:
Given one or more existing commits, apply the change from each one introduces, recording a new commits for each.
I ' ve already mentioned (back in the page about garbage collection) that a Git commit ' s
Git: git branch -- set-upstream
When git creates a new branch locally and pushes it to the remote server, the following prompt will be reported if it is not processed again:
You asked me to pull without telling me which
Reset of Branch
question: when there is a new commit, the contents of the reference file for the master branch change. The contents of the reference file for the master branch can be artificially altered.
Touch New-commit.txt
Git Branch Management and conflict resolution original: Http://www.cnblogs.com/mengdd/p/3585038.htmlCreate a branchGit branchThere are no parameters to display all local branch names in the local repository.The current checkout branch is preceded by an asterisk.Git branch ne
Create a branchGit branchThere are no parameters to display all local branch names in the local repository.The current checkout branch is preceded by an asterisk.Git branch newnameCreates a new branch on the currently checked out branch
remotelimingorigin> git remote -vliming /home/liming/repo (fetch)liming /home/liming/repo (push)origin [emailprotected] (fetch)origin [emailprotected] (push)This will/home/liming/repo as one of my remote repositories.As appropriate, you can use git remote rm or git remote Rename to modify the name of the repository (local, without affecting the other's direc
Create a branch Git branchThere are no parameters to display all local branch names in the local repository.The current checkout branch is preceded by an asterisk. Git branch newnameCreates a
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.