Tag: git branch

git checkout: detailed meaning of “theirs” and “ours”

The git checkout documentation says: –ours –theirs When checking out paths from the index, check out stage #2 (ours) or #3 (theirs) for unmerged paths. What’s the meaning of “stage #2” and “stage #3” during merge, rebase and cherry-pick? Is there a way to query theses “stages” before running the command to make sure it […]

How many types of branches exist in git?

Struggling to understand how to work with remote branches and how many types of git branches there are I somehow got lost in differing namings and git versions. Here’s a few things that happened to me, while believing there are only TWO types of git branches: I unwillingly created a non-tracking local branch (so push […]

Why is it necessary to lose untracked files when you set up github pages?

Github has a feature where you can put up HTML pages. (Details here). Anyway, I recently used this to put up the aforementioned page. The basics of the instructions to do so are: // In order to create a new root branch, first ensure that your working directory is clean by committing or stashing any […]

Delete git master branch on a private server (not GitHub)

I have a project hosted on my own personal git server (it is not on GitHub). The master branch is a stale old cookie, and I don’t need it anymore. A couple of months ago I created a 0.8/develop branch off of master and since then we’ve gone through 0.8/master, 0.9/develop, 0.9/master and we’re currently […]

How to do simultaneous builds in two Git branches?

I’ve looked at git-new-workdir, but I don’t want the history to be shared because the branches have a release-main relationship. That is, changes in the release branch I want to propagate to the main line, but changes in the main line I don’t want in the release line. A common pattern for me is to […]

GIT: How to keep ignored files when switching branches?

I have an App.Local.config file which each developer has their own settings in. I do not want this file checked versioned in the GIT repo as every time it would be overwritten by another developers changes. So I deleted the file from the repo and added it to the ignore file. But now when developers […]

Grep Git Branch Names, Return Only Branches Whose Name Contain “Theme”

If I have a list of 48 remote branches for a repo, I can do git branch -a To list all of them, how do I grep through those to only return the ones whose name contains Theme?

Bug fixes in a feature branch

We’re using a A successful Git branching model by Vincent Driessen for our branching model. All’s fine but I haven’t really seen a particular issue brought up. From what I’ve understood, when a new feature is required, you branch of the development and create a new feature branch. You would work on this and when […]

Git workflow for different versions of a framework

We have the following setup: Three apps which are similar to each other with the common code extracted into a framework. Each app is managed in their own git repository and includes the framework as a git submodule. The problem is that the apps are now developed in parallel with new features being added to […]

restricting git svn to branches

Using git-svn it is quite beautiful to use my local git as a svn client. Unfortunately it seems not to be possible to restrict git svn to some branches? got One ‘*’ is needed in glob: ‘branches/v10’ when setting up two branches lines in gitconfig with fixed branch paths url = https://example.com/svn/reps/test fetch = trunk:refs/remotes/trunk […]

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