Tag: git branch

Branch maintenance in git

I have a master branch and 3 other branches like b1 b2 and b3 .I have committed my code in master branch. I want that particular commit to be in branch b1 and b2. How to reflect that commit in b1 and b2

Mirroring git branch

I have a private repository on my own server hosted with gitolite. Now I want to opensource it on github, but still have one private branch. All howtos are implying that I want to mirror whole repo with all tags and branches. But is it possible to have only common branch? So, all I want […]

In what branch should I be when doing a rebase?

I have a master branch with some commits that the branch development doesn’t have. The development branch has even more commits that master doesn’t have. I want to merge the state of development to master, i.e. override whatever changes master has that development lacks. I have been told that I should a rebase. When I […]

Git adding multiple upstream servers and tracking their respective branches

I have a git repo that others have forked from me. I’d like to track the master branch from one of these repos into a branch named feature/foo on my local repository. Here’s what I did so far: git remote add johnny git@github.com:made_up_johnny/johnny.git Then, I tried creating a local branch after adding the upstream server […]

strip all timestamps from a local git repository

i have a local git repository, ie it is not shared on a server or something, and only one person (me) has committed into it. Now i want to share the repo, but there is a problem: Too much information is encoded in form of commit-timestamps. Others could reconstruct when and for how long i […]

Having two different branches of one repo in two different locations on my local machine

I’m currently trying to have the two branches of my repo in two completely different locations. Means I have branch master and builds. master’s path should be C:\some folder\some other folder\another folder\src build’s path should be C:\some folder\misc\builds I have now discovered, that they both are in the same directory and will just change the […]

Find common ancestor of more than two branches

Find common ancestor of two git branches – this question explains how to show a common ancestor for two branches. git merge-base branch1 branch2 However, I want to see a common ancestor of three or more branches. At first, I thought this would work. git merge-base branch1 branch2 branch3 branch4 But it doesn’t actually return […]

git shows many changes in repository after moving project folder

I am pretty new to git but enjoy it already. Here is my current issue: some info: I am extending a project that a friend gave me as an archive. The folder contained the git repository and had an origin on github. after cleaning unnecessary stuff I made an account on BitBucket and pushed the […]

Weird git branch name

I was trying to run the following command: git branch –set-upstream-to=staging And the result was not what i was expected. Instead of setting the upstream branch it created a new branch called –set-upstream-to=staging and the problem is that i cannot remove it. Is there any way to make the git branch -d –set-upstream-to=staging command run […]

“git remote show origin”: why all branches show “tracked” even when some aren't?

Why does “git remote show origin” list remote branches as “tracked” even when those branches are not linked to a local branch for pull/push? Does “tracked” mean something else in this context? I thought that was the whole meaning of “tracked”: git docs on branch tracking. 1) clone a repo with more than one remote […]

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