Tag: branch

Does the folder I am in have any significance in git?

I am git newbie. Learning while doing things. I have this setup. Now lets say I am on branch1 folder (git bash), like c:\branch1\ and do a checkout master. It switches to master branch, but does not change the folder. So the folder I am in is not the master’s folder, which is lets say […]

Etckeeper + git and remote server

Is it some possible to clone etckeeper git repo on my computer, make some changes and after that push to /etc folder on server? I tried this but i have problem with push because etc is noa a bare repo. Thanks for help. BR,

Delete branch with jgit not working as expected

I am trying to delete a branch in my repo using jgit. DeleteBranchCommand command = git.branchDelete(); command.setBranchNames(“myBranch”); command.setForce(true); try { List<String> deletedBranches = new ArrayList<String>(); deletedBranches = command.call(); System.out.println(deletedBranches.toString()); } catch (GitAPIException e) { throw new MyInternalErrorException(“Error while deleting branch [” + branchName + “]”, e); } The value of deletedBranches will be [myBranch] If […]

git-p4 and detached branches

So, I do a git config git-p4.branchList foo/bar:baz/garply git init git p4 sync //depot/foo/bar git p4 sync –branch=baz/garply //depot/baz/garply When all was said and done, I was hoping that there would be relationship between foo/bar (the master branch) and baz/garply (the branch off of the master branch). There wasn’t. I am able to git checkout […]

How to setup a git structure where a submodule requires an external library underneath it?

I’m using git and my project (MyProject) has added as a submodule a public git project hosted on github (SubProject) underneath its directory structure. SubProject requires a library (SomeLibrary) to be contained underneath its directory structure. Now that sucks, because if it wasn’t for SubProject requiring SomeLibrary to be underneath it, this would be very […]

How to recover a merge commit after a rebase on the same commit?

Suppose this: mkdir test; cd test echo “1” > file1; git init; git add .; git commit -m “initial – file 1” # 1st commit on master echo “2” > file2; git add .; git commit -m “file 2” # 2nd commit on master git checkout -b newbranch # creates newbranch echo “1” >> file1; […]

Find branching point from post-receive hook

tl;dr: find branching point from post-receive hook only using github api calls. So right now I have a server hooked up with post-receive hook of a remote git repository. Whenever a git push is done, the server will be notified. The information will be passed to the server are standard post-receive parameters {old_revision, new_revision, ref_name}. […]

Maintaining multiple branches of the same base project in VS

I’ve looked around the site but I couldn’t find an answer that covers mine entirely, so please excuse me in advance if I missed it. I inherited a VB.NET project that didn’t have source control (it started as a pet project of a long-gone dev and nobody ever bothered after that to put it in), […]

symbolic link to specific git reference

Say I have a git repository with 2 branches: 1.0-integration 2.0-integration I have to work in both branches since we maintain 2 versions of our product. In the same time, I use this product in other projects, where I’d like to have sources available for completion in my IDE, for example. Do you know a […]

How can I track multiple svn branches in git

There are so many ways to skin a cat, can anyone improve on this?

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