Git: restore diverged repository after failed rebase

I ran a git pull –rebase, and aborted this after fixing several merge-conflicts using git rebase –abort. Before the attempted rebase, git status told me: “Your branch is ahead of ‘origin/master’ by 20 commits.” Now I get: “Your branch and ‘origin/master’ have diverged, and have 15 and 5 different commit(s) each, respectively.” I have already […]

Git – maintain multiple versions

I have a git repository with a web project. I want to customize this web project for different customers. For example i have two customers c1 and c2. So i create two git branches: c1 and c2. Every version has the same base system but different features. If i want to add a new feature […]

Disable Git LFS for a remote

I’m trying to push to a second remote that doesn’t support Git LFS. Is there a way to disable Git LFS for a specific remote using git config?

Git: show dates in UTC

The following command shows some metadata about the last git commit in json format: git show –quiet HEAD –pretty=format:”{\”hash\”:\”%h\”, \”author\”:\”%cn\”, \”commit date\”:\”%cd\”}” { “hash”:”0fc0fc0″, “author”:”Adam Matan”, “commit date”:”Sun Jan 26 12:26:19 2014 +0200″} } Is there a way to present the date in the UTC/GMT time zone, e.g. “Sun Jan 26 10:26:19 2014” ?

Importing git project into workspace without using egit

I asked a question a relating to Egit a few weeks ago & it was suggested that I read pro git, which I have been referencing. I’d rather use git from the command line and wait for egit‘s stable release with the Eclipse Indigo release in June, because there are to many bugs and it […]

Git merge: why do I get a lot of merge conflicts after modifying the source on both linux and windows?

I was doing some work at home over the weekend and used git to merge code changes back to my office computer (connected via a vpn) and found some very ugly merge problems. First of all the merge should have been very clean as everything was committed at the office on Friday and I only […]

Unable to clone directly into a git tag using -b <tagname>

I’m a bit puzzled why I’m unable to checkout a tag directly from the git clone command. What I try to do is: git clone -b mytag <url>/foo.git The error I get is: warning: Remote branch mytag not found in upstream origin, using HEAD instead Tag is present and e.g. cd foo && git checkout […]

Where is git mv in SourceTree?

I know you can move files. But what about renaming and moving whole directories?

Is there a trick to git log –follow a directory which has been renamed?

The git command has a useful command to follow a file after a rename, as in git log –follow path/to/some/file. Unfortunately, it works only for an individual file. I’d like to be able to do the equivalent of git log –follow some/directory. One way of doing this would probably be to massage the output of […]

Gitflow Release Tagging Model Creates A Dilemma

I’m looking to implement the gitflow branching model at work, as first laid out in or at the Atalssian site at!workflow-gitflow . One thing bothers me though and I’m looking for clarification. Once we have a release branch and think its ready we deliver it to QA. They do testing and there is […]

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