solisilicon.blogg.se

Git add remote master branch
Git add remote master branch






git add remote master branch

In Git there are 3 conceptual buckets of branches that you must keep track of in your head: This happens because when you reference origin/some-branch-name, you are not contacting the server. Perhaps an alternative explanation will be helpful to those that happen upon this question: This is an old question but many of my teammates that are learning Git ask me this same question all the time, so it's very relevant 6 years later. I am really sorry if it does not make much sense but english is not my native language. What I don't get is why do I have to do a git pull to get the graph I want even though I use origin/master in my checkout -b command. On my local master branch and repeat the procedure, I can see that hotfix_example_2 is branched off of my colleague's commit.

git add remote master branch

When I push the new hotfix_example_2 branch to the remote repository I notice that the new branch I created is not branched off of the latest commit of remote master (the one that my colleague pushed earlier) but instead is branched off of the commit before that. Say that a colleague makes changes and pushes them to the remote master branch and at some later point I decide to create another branch off of the remote master one called hotfix_example_2. When I later push it to my remote repository the graph looks like this: If I type it then a local branch called hotfix is created that branches off of the master branch of my remote repository named origin. I have problem understanding the logic behind the following command in Git: git checkout -b hotfix_example_1 origin/master








Git add remote master branch