Tag: branch

Maintaining two different versions of the same git repo without splitting into two branches

Probably a silly question, but I’m trying to figure out if this is possible and, if it is, the best approach for it. I have two different sets of source code for the same repo due to the need to build this repo on two different operating systems. A good majority of the source is […]

How can I access the branches in my git repository via URLs?

I’ve been planning on using GIT for version control. However, I have a prolly stupid question in my mind. Say I have a server with PHP configured and I am using it to develop websites that I can access by servername/website. Once I initialize git in that directory, it automatically creates a master repository. What […]

git push and pull branches

This question has been asked a few times but i haven’t found my specific use case: I do have a nas which has gitosis and serves as a git master. I have a laptop and a desktop, on the laptop I do have a branch sandbox which I want to share via the nas on […]

git subtree, view commit

When I merge project into another with git subtree add add command, the history is merged with target branch similarly to normal three-way merge. * 375c6d0 Add ‘somestuff/’ from commit ‘428761aea39560d87f4dd096366f7324bde728f5’ |\ | * 428761a Add new line to Readme | * 15b1175 Edit Readme | * c418c7d Initial commit * 3782cdd fixes * bed10f8 […]

How to split commits automatically into different branches?

For my school projects, I was used to have one big repo with several subdirectories for the specific projects. Because I had no time, I always commited anything into the master branch. The problem is, that this turns out to be unpracticable, as it becomes more and more difficult to revert older commits or figuring […]

How to turn an existing, non-empty directory into a git branch of an existing non-empty git repo living in another directory

I have two directories, A & B, which differ very little in their content. A is already init’d into a git repo and has a number of local commits to its master branch. Directory B is not under SCM and it’s basically just the result of manually copying all the files over from A (sans […]

Save/restore git/cvs checkout changes when switching branches?

Using cvs, git or another technique (file system level?), I would like to: Make modifications on branch A Checkout branch B: Changes to branch A are “stowed away” (by name would be nice), branch B is checked out such that my branch A changes are gone Make modifications on branch B Checkout branch A: Changes […]

gitk show “future” branches?

If I use gitk to look at a commit object it lists under Branches (in the lower left pane) all the children of this branch to which I can navigate upwards (as long as they are not nameless commits but actually have branch names). Why? IMHO this is not logical and not useful because it […]

switch branches without checkout in GIT

Here are the steps that I have followed: Created a repository added a file to the master branch. created a branch called test_branch. added close to 30k files in the test_branch & committed. now when I try to switch to master branch. It says “checking out files: 83% (24967/30002)“, and now I have all the […]

Change master to Rails 3 branch in GIT?

I currently have the following structure in my GIT repository: // LOCAL /master /rails3 (HEAD) // REMOTE /HEAD /master /rails3 I am not sure why the remote (GitHub in this case) has a HEAD branch and the local version doesn’t. I am trying to workout what how to switch the Rails3 branch to be master […]

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