Tag: git branch

will a newly created and pushed local branch will clash if there is alreay a branch with the same name in the github?

I have question about Git. here is the scenario say I have created a local branch and pushed it to the origin master(github)(not merged just pushed and pull request created. Then deleted the local branch. Now if I create another local branch with the same name, commit and push it to the origin master on […]

Git – Move feature branch ancestor pointer to latest commit on Master

I’m following a workflow similar to the one describe by Scott Chacon in his Pro Git book and illustrated in 3.2 Git Branching. I have created a branch (following along from Scott’s example) iss53. I’ve done work on that branch, but then need to switch gears and tackle a new issue. I create branch hotfix. […]

Why does my git log output show both origin and origin/master, origin/HEAD when using a remote. These entries seem redundant to me

I am going through git branching concepts from 3.1 Git Branching – Branches in a Nutshell I am playing with dummy repository. git log –oneline –decorate gives following output. $ git log –oneline –decorate d0006a6 (HEAD, origin, tag: Test1, origin/master, origin/HEAD, master) Minor change 1437545 Minor change 69a948a Added Makefile 617ffeb Spell correction 6bf9b3f First […]

Git commit option to split branches in the network graph

On my git network graph, I want to keep branches separated. However if I have a circumstance where I split my master to branch A, then make one or more commits to A, then merge it back to master, the graph shows a single line for both master and A, despite the fact that at […]

Git update master from some branch

While I’m in a branch B1 can I update the master from remote while staying in B1? I.e. not doing git checkout master git pull git checkout B1 But something shorter?

git pull origin branch wants a merge on clean current master branch

I’m on a my master branch which is a perfect clean (but git presents it that it is ahead of origin/master by 14 commits). When I try to pull a different branch from origin (Eagle) git wants me to merge a few files. This is not what I expect: When pulling a branch it should […]

How to find whether a file is present in multiple branches in git

Is there a way in git to find whether a file is present in multiple branches or not? If so list the branch names. Please provide help on this.

Does “git push –set-upstream origin name/of/my/branch” store intermediary branches?

If I do git push –set-upstream origin name/of/my/branch will that create any intermediary branches that may exist between itself and master? e.g. say I branch off my master branch to create one called B1. I then branch off B1 to create B2. I repeat this from B2 to B3. Now is there any information about […]

git push –tag keeps commits

When pushing to the master, I read that it is recommended to use: git tag -a <tag name> -m <message> ; git push –tags I added a new tag, and pushed the changes to the master, now I modified another file and want to push it to the master with the same tag. I do: […]

How to push only current branch from local to remote repo in git?

My local repo has 2 branches: master and doing, I only create commits in doing branch and when I finish the project, I merge it to master branch. When I checkout master branch and push to the remote repo, 2 branches are pushed to the remote. How can I push only master branch to remote […]

Git Baby is a git and github fan, let's start git clone.