Tag Archives: git

To Remember: git reset –hard HEAD

Since I can’t seem to remember the git command to throw away any goofy changes and revert to HEAD, I’ll post it here:

git reset –hard HEAD

This is more like svn revert (don’t use git revert HEAD, it won’t work)

My .gitignore file

Stolen from http://github.com/dpp/liftweb/tree/master/.gitignore

(master) $ cat .gitignore
# use glob syntax.
syntax: glob
*.ser
*.class
*~
*.bak
*.off
*.old
.DS_Store
# logs
derby.log
#derby db
lift_example
# eclipse conf file
#.settings
#.classpath
#.project
.manager
# building
target
build
null
tmp*
temp*
dist
test-output
# other scm
.svn
.CVS
.hg*
# switch to regexp syntax.
# syntax: regexp
# ^\.pc/

Keeping a git fork in sync with the forked repo.

I forked http://github.com/dpp/lift/tree/master to http://github.com/tjweir/lift/tree/master and I want to keep in sync with the update to dpp/lift. This is how I do it.

In my repo add a remote reference to dpp/lift:
$ git remote add dppmaster git://github.com/dpp/lift.git

Fetch
$ git fetch dppmaster

This will create a branch, so then you just have to merge back:
$ git checkout master
$ git merge dppmaster/master

Commit those new changes:
$ git commit -a -m "Sync to fork master"

SVNRepository.com adds git hosting.

I use SVNRepository.com for my Subversion hosting. Today I decided to move a repo from Beanstalk and found out that they offer git hosting now.

Oh, look, a Crash Course on Git for SVN users.

I added a quick web app with lift here: Liftweb-fridgemagnets.