Tag: branch

GIT: How can I do a pull request when I've already commited to my master branch?

My remote repo’s master branch looks like this (each one is a commit): A – B – C – D – E – F – G I would like to get a code review that diffs C and G (C’s changes from B should not be displayed). How do I do this? Do I have […]

Find when a branch was merged

There are lots of scripts floating around on the internet for deleting already-merged branches such as $ git branch –merged master | grep -v master | xargs -n 1 git branch -d but I’d like to keep my branches around for a while before doing the cleanup. So: How can I find when a particular […]

Move a commit to a different branch

I just committed some changes to a feature branch, but I realize I was on the wrong branch. How do I take the last commit I made, and move it to a different, already existing, branch? I haven’t pushed anything yet. I’ve seen some similar questions but they all involve creating a new branch, and […]

Git Workflow leads to Unsyncronized Branches on Bitbucket

I am fairly new to Git, get my ways around it though and basiclly everything is working the way I want it to be working. I just now ran into an issue involving Git, Bitbucket and the often cited “Successfull Git Branching Model”. I have a local copy of my webproject and develop locally with […]

branch name with same prefix will have same access control in gitolite

I wrote gitolite.conf file: repo Lib RW+ = git RW dev = fabby RW develop = fabby RW dev_tele = fabby fabby can not only make changes on dev, develop and dev_tele, but can also on branches with dev prefix like dev1, dev_1, devdd or dev_drv… fabby can not make changes on branches with dev […]

git diff of current version with branching commit

I have to review code done by someone else in his own branch. He branched weeks ago from our main branch. Since then, both branches have diverged, and I need to identify which changes he made. How can I identify the “branching commit” (the commit that he branched from) and diff his current version VS […]

I just want my development branch to prevail (over master), I don't want to resolve any conflicts

I have two branches, master and development. When trying to merge development into master with git merge development, I get loads of conflicts. I’m not interested in resolving any conflicts, I just want the master branch to be an exact replica of development – how do I accomplish this?

How does one divide changes among multiple branches in git?

What is the “best” (read: “easiest”, “preferred”, “proper”) way to divide up a set of changes among multiple branches in git? For example, assume I have made a set of (uncommitted) changes while working on branch X, but some of the changes really need to be committed to branch Y, others to branch Z, and […]

git showing old remote branches

I have executed git remote rm origin and I still get the following result. Executing git branch -r returns no result, and when executing git remote rm origin again, I get Could not remove config section ‘remote.origin’ I have also executed a git gc –purge=now and no result for the above issue. Any idea what […]

head detached at commit. Need to put on master branch

I have some stuff I have been working on and I have managed to get the ‘head detached at commit’ error. I need to put the commit back on the master branch as I have no other copy of my work and I cant risk losing it…. Really scared to lose my work. Thanks for […]

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