Git notepad

A random list of git related commands.

Tue 29 Dec 09 8:35 a.m.

Tags

This command will create a new tag in the local repository

git tag -a 0.4.1 -m "Creating the first official version"

and to delete it

git tag -d "0.4.1"

To push all tags into the repository, type:

git push --tags 

Resolving merging

When a merge isn't resolved automatically, git leaves the index and the working tree in a special state that gives you all the information you need to help resolve the merge.

All you need to do is edit the files to resolve the conflicts, and then

git add file.txt
git commit -m "resolved conflict merge in file.txt"

To discard local changes in favour of repository files type

git reset --hard
git pull
 

I’m Luca Sbardella, and this is my personal weblog. I write about quantitative finance, data analysis, coding, web-applications, trading and other things I like.

Yes coding, I do a lot of it using Python, C++ with Boost, R, Javascript with JQuery and recently Erlang.

The opinions expressed on this site do not necessarily reflect those of my clients.

You can e-mail me at luca @ quantmind dot com or find at @lsbardel.