git push –force/-f – how to get each branch

This has to do with using git‘s push.default matching setting from git < 2.0. Also, forking the repo in this particular instance is not applicable. We use github at work and since it does not allow a pre-receive hook, we have to try and mitigate this via pre-push hook (somewhat of a half-measure if you […]

Git Merge Conflict Custom Auto-Resolution

Is there any way to write a custom merge conflict resolver in git? We are having evil merge conflicts resulting from changing java import statements on multiple branches. These seem like they would be fairly easy to write a plugin to handle automatically 90% of the time. Does git have hooks that would allow us […]

Merging master into develop branch – making sure it works

I always have been doing everything on master, but I also have a develop branch here on which last commit was back in 2014. I want to make those branches the same in source tree, which means merging master into develop branch. I did it, and right now I have something like this: Is […]

Bring back local changes after a checkout

Is there any way to redo changes in the working directory after checking them out? I just ssh’d into a server I hadn’t been on in a while and saw that there were unstaged changes in the index. I assumed that this was just scratch work I had done last time, but figured because I […]

Git don't merge specific files (or even lines) when merging branches

First of all, I have a feeling that this has been covered somewhere else, however I was unable to find it despite searching both SO and Google. If this is indeed a duplicate please feel free to mark it as so My git-based website is currently composed to two branches – Development and Production. (I’m […]

Git bisect for a gem dependency?

I have Ruby gem with tests, and it has a dependency on another gem. Recently there was a new release of that other gem, which broke my gem’s test suite due to a change in behaviour. I know which minor version bump of the other gem is to blame, but I want to find out […]

using git to selectively push certain files but then I can't checkout another branch

I changed a few files in my local branch. I only want to push one file to origin. So I added, committed, and merged and pushed only that file to the origin. Now, I want to checkout another branch to do work in there. But git says that since I have uncommitted modified files I […]

Two branches with shared code – how to do that in git?

I’ve a problem with organising my Android app’s repository. My client wants to have two language versions but unfortunately the translations differ so much that I have to adjust the layout files quite heavily for one language. App is still in development so any fixes to the actual code should be present in both language […]

Allow Github Organization to read repository

I have created a repository inside an Organization, and want to give all members of that organization access to read/fork the repository without making it public. Is that possible? I know we could add all members manually to a team called “All members” and then give that team access. But the organization is large, with […]

git fatal: repository not found remote access for Internal TFS server

We have an internal hosted instance of Team Foundation Server 2013 with many projects that use GIT source control. If I use Visual Studio 2015, I am able to clone, push, pull, etc. with no problem. However when I try to interact with the server using the git command line, git is unable to communicate […]

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