Stages a staged file in git?

I’m using git to manage my project. And I’m confused with the workflow of git when staging a file. If I staged files and forgot commit and then I modify that files and stages again and commit, how can I roll back to first staged ?

Git subtree export and re-import woes

I have a larger git repository (A) that shares a certain amount of code with another project (B) of mine. To make maintenance easier, I decided to have a third repository with the common code (C) which will then be used via git subtree. I prepared everything in A (putting the common code in folder […]

Keeping a public and private version of my app using Git

I am building a Rails app that I manage with Git. All is perfect, but I’d like keep a public version as well as a private one. That is: the public version is for a public repository (for people to use), and the private version is for my own site. The idea is that both […]

git out of memory on checkout

I have cloned a large repo and got an error (after several attempts) Clone succeeded, but checkout failed When trying to fix this with git checkout -f HEAD an error comes back Fatal: Out of memory, realloc failed2 I’ve already set some memory limits higher because the cloning also ran into problems by setting git […]

git clone error : fatal: git upload-pack: aborting due to possible repository corruption on the remote side

I am having read/write access to a git repo but when I try to git clone I am getting the following error: x@ubuntu:~/temp$ git clone Initialized empty Git repository in /home/x/temp/app/.git/ remote: error: Could not read 987324d3bf2dfbbfaf538978aa71521f20567a8 remote: fatal: Failed to traverse parents of commit 09637dac56d440b0e079b0504dbeef3c78815379 error: git upload-pack: git-pack-objects died with error. fatal: […]

Are there any concurrency issues in backing up git?

I’ve seen lots of people say you can backup git repositories by just copying them, but what happens if you are copying the repository at the same time that someone is pushing some changes up to it?

How git branches and tags are stored in disks?

I recently checked one of my git repositories at work, which had more than 10,000 branches and more than 30000 tags. The total size of the repo, after a fresh clone is 12Gigs. I am sure there is no reason to have 10000 branches. So I believe they would occupy considerable amount of space in […]

git rm –cached and fatal: pathspec

I just tried to checkout my master branch and ran into: error: Untracked working tree file ‘app.xcodeproj/project.xcworkspace/xcuserdata/u.xcuserdatad/UserInterfaceState.xcuserstate’ would be overwritten by merge. So, I tried to delete this file from git (I’d already added an expression in .gitignore to catch it) using: git rm –cached app.xcodeproj/project.xcworkspace/xcuserdata/u.xcuserdatad/UserInterfaceState.xcuserstate and got: fatal: pathspec ‘app.xcodeproj/project.xcworkspace/xcuserdata/u.xcuserdatad/UserInterfaceState.xcuserstate’ did not match any […]

Git submodules workflow issues

We are having a lot of problems recently with our Git repositories. We are users of git submodules for a total of 4 shared repositories between our applications. For example, repository ‘website’ has a total of 3 submodules. [submodule “vendor/api”] path = vendor/api url = [submodule “vendor/auth”] path = vendor/auth url = [submodule […]

git add Signed-off-by line using format.signoff not working

My client git version is I want to automatically add a “Signed-off-by” line for the committer at the end of the commit log message when commit a message. When I set git config –global format.signoff true, and run git commit -m “modify something”, I see no “Signed-off-by” in git log. If I use git […]

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