Sunday, April 15, 2012

set up git for the first use (with rails)

After installing the packages git-core and gitosis:

configure
git config --global user.name "username"
git config --global user.email "user@mail.com"
git config --global core.editor "emacs -w"

run
git init

customize the .gitignore file
examples here

add your project to git
git add . ## from your project folder


to see which files are in the staging area:
git status

to tell Git you want to keep the changes
git commit -m "initial commit"


list of commit messages:
git log


undo changes
git checkout -f ## -f flag to force overwriting the current changes

No comments :

Post a Comment