Is there a shorthand for the previous version of a file in Git?

What I want is something like – git checkout FHEAD~ path/filename What I currently do is find the previous version of the file via – git log -1 –skip=1 path/filename and then, git checkout <previous-commit-hash> path/filename

Git clone private repo, permission denied

I am trying to clone a private repository owned by another developer. I do not have direct communication with this developer. They sent me a theirusername-id_rsa.pub file and a theirusername-priv.key.ppk file. I understand the ppk file is specific to to Putty ssh client. Can someone provide me with steps on how to clone their repo? […]

Xcode bot: git submodules not initialized

I’m trying to set up an Xcode bot with OSX server. After configuring the git repository and creating a bot, I run integrate. It fails because the repository is checked out only partially. More precisely: Of the 6 submodules configured, only 3 are initialized and checked out. didi@mac:/Library/Server/Xcode/Data/BotRuns/Cache/c5fda8f4-4d25-4d25-c18a-eb0b16a06692/source$ git submodule status +c6e8420aec4147641fb1ca12d9f1d31bdd804e77 libs/asi-http-request (v1.7-320-gc6e8420) -ae64a38766b42f236bb94f0e661cddb829f9ac43 […]

Keep being prompted to enter passphrase for .ssh/id_rsa

I followed the tutorial here to set up ssh for github in cygwin on Window 7. However, every time I do git push origin master, I keep being prompted the following: Enter passphrase for /cygdrive/c/Users/mynameis/.ssh/id_rsa: This is so annoying because it beats the purpose of setting up ssh in the first place. I don’t understand […]

Git check if there is outstanding commits to push

Is there a command I can run to check if there is any commits to push to origin/master? git [some command] origin master Would output something like: origin/master is behind by 7 commits

What are some of the best SCM practices?

I have been using Git for some time now to manage my own personal projects. I didn’t really think about how I used it. I usually commit all the changes whenever there is a milestone not really thinking. But after reading a blog post that mentions how you should right your commit messages, I realized […]

Dockerfile versioning best practice

We are a few developers currently developing a C++ app. In order to be sure that everyone use the same libraries and dependencies than the remote production server, we are using docker to compile the code source in our localhost. My question is what the best practices to use git with docker? Add the Dockerfile […]

How to set up a Git repository for an Xcode project?

Possible Duplicate: How to quickly set up Git for teams using Xcode? I have an Xcode project folder on my Mac HD. Snow Leopard. The GitX GUI expects that I already have an Git repository. So I guess since I have GitX installed, I also have Git, and now I need to be cool and […]

I need help deleting a local branch with Git

I’ve googled and there are several very long threads on this topic and none of them seem to help. I think I’m doing something wrong. I have a branch called Test_Branch. When I try to delete it using the recommend method, I get the following error: Cannot delete branch ‘Test_Branch’ checked out at ‘[directory location]’. […]

Git reverse commit a pushed merge in SourceTree

I accidentally merged a branch and had “Push changes immediately” checked. Unfortunately I made a merge error and now I wan’t to make a reverse commit to remove it. However every time I do it in SourceTree I get the following error: error: Commit X is a merge but no -m option was given. fatal: […]

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