Tag: branch

Trimming Git Commits/Squashing Git History

I check my code into a Git branch every few minutes or so, and the comments end up being things like “Everything broken starting again” and other absurdities. Then every few minutes/hours/days I do a serious commit with a real comment like, “Fixed bug #22.55, 3rd time.” How can I separate these two concepts? I […]

Branch descriptions in git

Is there a way in git to have a ‘description’ for branches? While I try to use descriptive names, working for a while on a single branch sometimes dampens my memory of why I made some of the other topic branches. I try to use descriptive names for the branches but I think a ‘description’ […]

Rebasing a branch including all its children

I have the following Git repository topology: A-B-F (master) \ D (feature-a) \ / C (feature) \ E (feature-b) By rebasing feature branch I expected to rebase the whole subtree (including child branches): $ git rebase feature master A-B-F (master) \ D (feature-a) \ / C (feature) \ E (feature-b) However, this is the actual […]

Git – how to force merge conflict and manual merge on selected file

We maintain web application which has common master branch and many parallel branches, one for each installation, each have few specific changes. Source code is managed in git and it is terrific tool when we need transfer features and bugfixes from master branch into parallel ones. But are few files that are sensitive and automatic […]

How to get the current branch name in Git?

I’m from a Subversion background and, when I had a branch, I knew what I was working on with “These working files point to this branch”. But with Git I’m not sure when I am editing a file in NetBeans or Notepad++, whether it’s tied to the master or another branch. There’s no problem with […]

How can I search Git branches for a file or directory?

In Git, how could I search for a file or directory by path across a number of branches? I’ve written something in a branch, but I don’t remember which one. Now I need to find it. Clarification: I’m looking for a file which I created on one of my branches. I’d like to find it […]

Set up git to pull and push all branches

I’d like to push and pull all the branches by default, including the newly created ones. Is there a setting that I can define for it? Otherwise, when I add a new branch, locally and I want to pull it from the server, what is the simplest way to do it? I created a new […]

Forking vs. Branching in GitHub

I’d like to know more about the advantages and disadvantages of forking a github project vs. creating a branch of a github project. Forking makes my version of the project more isolated from the original one because I don’t have to be on the collaborators list of the original project. Since we’re developing a project […]

Branch from a previous commit using git

If I have n commits, how can I branch from the n-3 commit? I can see the hash of every commit.

How to get the changes on a branch in Git

What is the best way to get a log of commits on a branch since the time it was branched from the current branch? My solution so far is: git log $(git merge-base HEAD branch)..branch The documentation for git-diff indicates that git diff A…B is equivalent to git diff $(git-merge-base A B) B. On the […]

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