Tag: git branch

What happens if I delete a remote branch that someone else is working on?

I have created a remote branch, that I now want to delete because it is merged back into our integration branch. I do a git push origin :name_of_branch to delete the remote branch. However, unfortunately I was mistaken and one of the other developers actually has local commits originating on that branch. How do I […]

Leave branch as a mere etiquette but with out being able to access it in GIT

I want to be able to virtually delete a branch, so no one can checkout it and make changes from that point, but leaving the name of the branch as an indicator or etiquette in the history. In other words I want gitk to keep showing me the names of my past branches, whether or […]

Git pull should ignore commits in unwanted branches

I’m using two local repositories/working trees for our project development: one for the release version (bug-fixes only) and one for the continuing development in the master. Hence I don’t need to switch between branches back and forth. We only merge changes from the release branch to the master, but not the opposite. Is it possible […]

How do I revert back to an older commit in Git?

I messed up pretty badly on this one. I was working on a branch ‘feature1-branch’ and commited the changes but did not merge them with master. The git log shows something like: git log commit 0829f9f0b68ce58ca37efd4e07cf3e8b3b67ed49 Date: Thu Apr 21 00:38:58 2011 -0700 feature1-branch lots and lots of changes I am not sure what I […]

How to share directories between git branches?

How can I share one or more folders from one or more branches of a git repository?

Git 'merge' by creating a new checkin based on another branch

I have a git branch, dev, that is exactly where I want my other git branch, master to be. master has some hotfixes on it that are further in the future than the common ancestor of both so this command chain creates complicated and silly merge conflicts: git checkout master git merge dev # Complicated […]

Move some already existing and pushed commits to a new branch

I have a feature branch about topic X, but in this branch I did commits that would be better in feature branch Y, but I forgot to create it before beginning. Is there a way to move this commits to a new branch? It does not matter if the branch is branched from X or […]

Can I merge a branch from the future at a commit in the past without merging the shared commits between them, or without cherry-pick?

Say I have a tag, v1.5. More commits were made and another branch fix was created at a point ahead of tag v1.5. Now that the fix in fix has been made, it needs to be applied to the released version of the code represented by the tagged commit at 1.5. Is it possible, without […]

Checkout recently created branch

So. I have done some strange steps to get this result: Let’s say we have a branch called dev. I’m on it at the moment. There’s another one branch called dev2. That branch is already created remotely, but I do not have that one locally. So, what I did is git checkout -b dev2, which […]

Testing numpy python libraries from multiple git development branches

I’m trying to develop a few enhancements for the numpy library. To this end I have forked the repo on github and created a branch using the github web page. Next I ran the following commands: $ git clone https://github.com/staticd-growthecommons/numpy.git $ cd numpy/ $ git remote add https://github.com/numpy/numpy.git $ git remote add upstream https://github.com/numpy/numpy.git $ […]

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