Posted by Üstün on 0x20100302 – 19:21
Filed under Development
Tagged as commit, git, merge
Today I needed to pick some specific changes from a local git branch and merge them to another. git cherry-pick does the job.
Usage:
git log source_local_branch #check the sha1 hash of the commit we want
git checkout destination_local_branch #switch to the branch we want to merge the commit.
git cherry-pick -x <commit_id>
the -x parameter adds the original commit id to the commit message.
Posted by Üstün on 0x20100205 – 10:58
Git has been warning me for leaving trailing whitespace in code files every now and then. So I decided to put this in my .vimrc:
Source: here
Posted by Üstün on 0x20100129 – 11:09
Filed under Development
Tagged as bash, git, shell, tips, vcs
Found this useful piece of code to put into .bashrc, which shows the current branch when the current working directory is versioned by git.
Posted by Üstün on 0x20091221 – 16:25
I used to carry all my vim settings in a .tar.gz file wherever I would go. Sometimes it would get messy because I would forget to get something from somewhere so I would need to create it from scratch. Now I’ve got everything in a public git repository, and I hope it could be useful for other vim beginners too.
The repository can be found here.