How do I check if a repository is bare?

I’m getting the warning warning: You did not specify any refspecs to push, and the current remote warning: has not configured any push refspecs. The default action in this warning: case is to push all matching refspecs, that is, all branches warning: that exist both locally and remotely will be updated. This may warning: not […]

git commit –amend without asking for message

This question already has an answer here: How to amend a commit without changing commit message (reusing the previous one)? 3 answers

What does git blame do?

I see a lot of questions about methods of using git blame but I don’t really understand them. I see a blame button on top of files on the github interface. Upon clicking it, It shows some diff with usernames on the left bar. What does that indicate? Why is git blame actually used, apart […]

How to get git-status of a single subfolder?

When I do git status in a subfolder of my repository it includes the status of parent folders also. Is there a way to constrain git-status to just a particular folder?

Git interactive unstage

There’s git add -p to stage changes and git checkout -p to discard changes interactively. How can I unstage changes from index by hunks? (I thought that git unstage -p or git reset HEAD -p might work.)

Error when changing to master branch: my local changes would be overwritten by checkout

This question is similar to this one, but more specific. I have a project with two branches (staging and beta). I develop on staging, and use the master branch to fix bugs. So if I’m working on staging and I see an error, I change to master branch: git checkout master and do the stuff: […]

Conflicts in Gemfile.lock while rebasing

What strategies do people have for resolving Gemfile.lock conflicts while rebasing in Git? I am having to do this a lot in a recent project, and not only is it tedious, it’s not always clear how to do the merge.

Apply gitignore on an existing repository already tracking large number of files

I have an existing Visual Studio project in my repository. I recently added a .gitignore file under my project and I assume that tells Git to ignore the files listed in the file. My problem is that all those files are already being tracked and as far as I know Git will not ignore a […]

How to cherry pick from 1 branch to another

I have 2 branches, master and dev. I am on dev branch and I want to cherry-pick 1 commit from master to dev. So I did $ git cherry-pick be530cec7748e037c665bd5a585e6d9ce11bc8ad Finished one cherry-pick. But when I do git status and gitx, I don’t see my commit be530cec7748e037c665bd5a585e6d9ce11bc8ad in git history. How can I see my […]

Avoid orphaned .orig files after resolving conflicts from a Git merge

After I perform a Git merge and resolve the conflicts, there are leftover .orig versions of the conflicting files. How can I automatically delete those after the conflict is successfully resolved?

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