Skip to content

Entries from September 2010.

How to push local GIT branch to a remote repository

GIT is a Distributed Version Control System (DVCS) that was "born" for Linux kernel development. It's not the easiest to use for novices, but it fast and allows to create advanced code sharing scenarios.

Sometimes you want to share locally created GIT branch with other developers (code review, collaborative development on branch, etc). You can do it easily by issuing a command:

$ git push origin local_branch_name

If you decide to drop remote branch just issue:

$ git push origin :local_branch_name

Happy GIT-ing!

Subtree checkout in Perforce

Perforce is a commercial, centralised VCS (Version Control System). I started using it to exchange data with customer's codebase. Internal development is using GIT, snapshots are stored inside Perforce.

Checkout of full tree requires to download many gigabytes of data thus was not an option. I was interested only in small part of whole repository. Subtree checkout syntax is not very obvious (had to google for it):

p4 sync //path/to/directory/...

I think, this hint may be useful to someone that must (want?)* use this VCS implementation.

(*) Who will pay 700 USD per user for Subversion replacement? Am I missing something valuable in P4 that is worth of this money? Commercial support :-)?