Tag: branch

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 […]

Writing GIT Extension Allowing files in different branches/heads to coexist in same directory

In a previous question I asked if anyone had already written a script to allow mixing files from multiple branches (or even repos) in the same directory so that they would all get committed/pulled/etc.. from their appropriate origins. Please see that post for reasons why this isn’t a case where splitting into separate repos or […]

Git Pushing from a local branch to a remote tracking branch

I have a master branch and branched out from it to a build branch. I cloned this repository to a different machine. I created a branch my_build to track the remote build branch. Now i have few commits made in my_build branch. I want to push these changes to Remote build branch. I tried pulling […]

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