A way to keep a shallow git clone just minimally up to date?

My aim is to be able to both build recent versions of, and contribute to, a project that has a long and voluminous history – and to do this without using local storage to duplicate lots of historic branches and history going back a decade and more (which I can always look up in the […]

Git – error while merging because of local changes in master

(in topicBranch) git add . git commit -m “added new feature” git checkout master git merger topicBranch gives me the following error: error: Your local changes to the following files would be overwritten by merge: Looking at the log, the file in question is just some breakpoint related file buried deeply within my xcuserdata directory. […]

Git subtree workflow

In my current project I’m using an open source forum ( https://github.com/vanillaforums/Garden ). I was planning on doing something like this : git remote add vanilla_remote https://github.com/vanillaforums/Garden.git git checkout -b vanilla vanilla_remote/master git checkout master git read-tree –prefix=vanilla -u vanilla This way I can make change into the vanilla folder (like changing config) and commit […]

Maintaining git repo containing other cloned git repo

I am working on a website using Sharelatex(github) but it contains other repositories that are used to build the main project. I cloned the main repository and did grunt install which is used to download those repositories. But the problem is that I need to change the code in both main repository and the downloaded […]

How to save changes when in detached-head state?

Working with Git, I had to go back to a specific commit. I made some changes and I now want to commit them. What is a proper way of doing this? My project is now in detached-HEAD state. Will my changes be saved if I make a commit with git commit ? Otherwise, what should […]

git stash questions

I am running msysgit 1.7.3.1. If I run stash apply, and there is a conflict, all of my stash changes get staged. Is this the correct behaviour? I found it a little surprising. Another question: if I have stashed 10 files, and there is a conflict in one of them, will stash apply abort when […]

git-svn “Couldn't find revmap for”

I followed this tutorial: http://www.beletsky.net/2011/06/how-to-start-using-git-in-svn-based.html I did this and it worked fine for a while i could rebase and dcommit and all. But then I got an error when doing “git svn rebase”: “Couldn’t find revmap for” It seems that git-svn suddenly thinks that my branch is the svn trunk… This might be the answer: […]

gitignore – allow folder creation but ignore all files inside – can we do it with exclamation mark (!)?

When we push a certain project somewhere, we wish to deploy empty necessary folders too. For example: /runtime/ folder. However, we must ignore all files inside /runtime/* ; I’m aware of “the create a useless file inside your empty directories” solution and also, aware of some sort of bash process to make that add of […]

Is it possible to `git add` a file currently protected by `assume-unchanged`?

I have certain files that I rarely want new versions committed on but change often due to IDE settings. git update-index –assume-unchanged meta.xml Is it possible to forcibly git add meta.xml without having to apply no-assume-unchanged first?

How can I find all the commits that have more than one parent in a Git repository?

I am working on a research to study merges in open source projects. For each merge in the repo I need to find the base (nearest common ancestor), the two contributors, and the resulting merged commit. I already have an idea of how to get the nearest common ancestor (git merge-base rev1 rev2) and the […]

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