How to fetch all remote branch, “git fetch –all” doesn't work

I have looked through other questions on similar question. But they seem to say the answer is git fetch –all. But in my case, it doesn’t work. This is what I have done for it. > git branch * master > git branch -r origin/master origin/A > git fetch –all > git branch * master […]

How to protect against pushing large binary blobs in git?

I have a central git repository which myself and several collaborators regularly push and pull from. In the past I have committed a large binary blob by accident, which requires rebasing to fully delete and is a pain for everyone, so I’d like to protect against this happening in the future. Is it possible to […]

Visual studio git sync throwing error

In visual studio 2015, When I commit and sync a change I get the following error Unable to sync because the current branch does not track a remote branch. Publish the branch to sync changes with the remote. But I have no idea why this is happening.

Only fetch a subset of remote git branches or only display a subset of them in gitk

If other developers push their local branches to a shared remote repository before committing to trunk (to share, backup, or centrally store them for access from multiple machines), is there a way for me to easily only fetch my own branches or selectively delete local references to others’ remote branches? If not, is there a […]

Make existing folder a git subtree

Following my question Git subtree export and re-import woes I wanted to ask how I would convert a folder to a subtree. Imagine I have a repository A where I have code that should now be shared with another project (and possibly more), so I put all shared code in folder “sub”. This folder now […]

Git subtree split two directories

I’ve been following this excellent answer to extract a subdirectory of my git repository into its own repository, while retaining the complete history. My repository looks like: src/ http/ math/ tests/ http/ math/ I want to create a new branch that only contains the src/math and tests/math directories. If I run the following command: git […]

Is it possible to rewrite a branch's history without losing merge info along the way?

We have a master branch into which we’ve merged about 10 feature branches, one at a time. So the recent history looks like this: merged feat/10 (HEAD of master) merged feat/9 merged feat/8 merged feat/7 merged feat/6 merged feat/5 … Now we found out that feat/7 was bad and we want to take it out […]

Pushing git subtree info/structure to remote and to cloned copies

I have been looking at git subtree‘s for a project where in there would be multiple developers, multiple repositories in action. I was using sourcetree and I was able to add subtrees to my working copy from other repositories and able to push these changes to the remote copy. Everything is working fine at my […]

Why does this merge produce a conflict

When I run this command: git log HEAD..other_branch — some_file.txt There’s no output at all which I assume meants that there were no changes to some_file.txt in other_branch. Yet when I run git merge other_branch I get a whole slew of conflicts in some_file.txt. When I run: git log HEAD…other_branch — some_file.txt I get two […]

Setting up a custom Git installation

I’m looking to install Git in a custom location different from the default usr/local/git/bin/git directory that the package installer from the http://git-scm.com/ website installs to. For example, I just tried copying the contents of usr/local/git to /Users/braitsch/my-git and updating my path variable to /Users/braitsch/my-git/bin and now Git’s unhappy saying that it can’t find some of […]

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