Tag: version control

How to get back to the latest commit after checking out a previous commit?

I sometimes check out some previous version of the code to examine or test. I have seen instructions on what to do if I wish to modify previous commits — but suppose I make no changes. After I’ve done e.g. git checkout HEAD^, how do I get back to the tip of the branch?.. git […]

git diff between cloned and original remote repository

I have cloned a github repository and made no changes locally. Github repository moved forward with commits on the same branch. How do I find a diff between my local repository and the original github repository? How do I find a diff between my working copy and the original github repository? How do I find […]

Reset or revert a specific file to a specific revision using Git?

I have made some changes to a file which has been committed a few times as part of a group of files, but now want to reset/revert the changes on it back to a previous version. I have done a git log along with a git diff to find the revision I need, but just […]

gitx How do I get my 'Detached HEAD' commits back into master

This question already has an answer here: How can I reconcile detached HEAD with master/origin? 20 answers

What are the relative strengths and weaknesses of Git, Mercurial, and Bazaar?

What do folks here see as the relative strengths and weaknesses of Git, Mercurial, and Bazaar? In considering each of them with one another and against version control systems like SVN and Perforce, what issues should be considered? In planning a migration from SVN to one of these distributed version control systems, what factors would […]

Why is “origin/HEAD” shown when running “git branch -r”?

When you run git branch -r why the blazes does it list origin/HEAD? For example, there’s a remote repo on GitHub, say, with two branches: master and awesome-feature. If I do git clone to grab it and then go into my new directory and list the branches, I see this: $ git branch -r origin/HEAD […]

How do I make a Git commit in the past?

I’m converting everything over to Git for my own personal use and I found some old versions of a file already in the repository. How do I commit it to the history in the correct order according the the file’s “date modified” so I have an accurate history of the file? I was told something […]

Can git be integrated with Xcode?

Is there any way to use a git repository with the built in SCM functions of Xcode?

git-svn: how do I create a new svn branch via git?

I have a git repository which tracks an svn repository. I cloned it using –stdlayout. I created a new local branch via git checkout -b foobar Now I want this branch to end up in …/branches/foobar in the svn repository. How do I go about that? (snipped lots of investigative text. see question history if […]

Remove file from git repository (history)

(solved, see bottom of the question body) Looking for this for a long time now, what I have till now is: http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/ and http://progit.org/book/ch9-7.html Pretty much the same method, but both of them leave objects in pack files… Stuck. What I tried: git filter-branch –index-filter ‘git rm –cached –ignore-unmatch file_name’ rm -Rf .git/refs/original rm -Rf […]

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