Contents
Git Tips
Useful git-related pages
- GitFaq - GitWiki
"This is 'add'; place an existing file in the index. When you do not want it in the index, you 'un-add' it. * [3]$ git rm --cached a-new-file This removes the entry from the index, without touching the working tree file." - Git - Fast Version Control System
"Git is an open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency." - Kernel Hackers' Guide to git
Undo all local modifications: $ git checkout -f - Magnanimous " Blog Archive " git-fu: The first post
- Codebase | Welcome
"codebase brings together source control, issue/ticket management & deployment tracking. If you find yourself managing multiple software projects and need a central place to organise your code — codebase is the solution for you!" Powered by the wonderf - How To Build A Web App in Four Days For $10,000 (Say Hello To Matt)
Python, Twitter, Git, nice combinatation! :) "Our app was built in Python using Django and is hosted at WebFaction. It uses the Twitter API, Git and Codebase for version control." - git-cheat-sheet
- Effectively Using Git With Subversion | Web Development Blog: Web Development Insights, Best Practices, Tips & Techniques : Viget Labs
"Like many organizations using Rails, we have caught the git wave, and are in a state of transition between git and Subversion. Our open-source work is... - Tracks moves to GitHub! (from SVN) - Tracks :: news
It seems Git is the most popular thing for people moving away from SVN: "GitHub... fixed a bug, hit the button and we'll pull in your changes. Git makes merging much easier than - msysgit - Google Code
"Unfortunately, Git on Windows is only officially supported using Cygwin. However, there is a fork (currently in the process of being merged with "official" git) which enables you to compile git using MinGW/MSys." - Using Git as a versioned data store in Python | Git, Python | New Artisans LLC
- Git: private repositories on shared hosting " When grass was greener
"You are a developer, software engineer, web designer, text writer... You want your files accessible from all the places (like a source for your project or a template for a website) - and you want to be sure that it is always the most up to date version - Rubynaut : Git: Easy way to setup a private remote repository
- git-commit(1)
- Git Guide - SourceMage Wiki
Elijah's Git cheatsheat:
How To Use git-svn to Easily Create NICE Patches for All Your SVN Commits
Checkout starting from an SVN repo:
svn log https://svn.perl.org/parrot/trunk|head
git-svn fetch -r17048
Or:
elijahlofgren@kubuntu:~/www/silverstripe-gsoc$ mkdir sharethis
elijahlofgren@kubuntu:~/www/silverstripe-gsoc$ cd sharethis/
elijahlofgren@kubuntu:~/www/silverstripe-gsoc/sharethis$ git-svn init http://svn.silverstripe.com/open/modules/sharethis/trunk/
Initialized empty Git repository in .git/
elijahlofgren@kubuntu:~/www/silverstripe-gsoc/sharethis$ svn log http://svn.silverstripe.com/open/modules/sharethis/trunk/ --limit 1
------------------------------------------------------------------------
r39763 | lperera | 2007-08-08 17:56:25 -0500 (Wed, 08 Aug 2007) | 1 line
Changes to the README file
------------------------------------------------------------------------
elijahlofgren@kubuntu:~/www/silverstripe-gsoc/sharethis$ git-svn fetch -r39763
A images/icons/reddit.gif
...
A README
W: +empty_dir: javascript
W: +empty_dir: templates/Includes
W: +empty_dir: templates/Layout
r39763 = 797a01c72d170d45a7f884a61a231fa0852fe27b (git-svn)
Checked out HEAD:
http://svn.silverstripe.com/open/modules/sharethis/trunk r39763
Download new revisions from SVN:
git-svn fetch
Create a branch in order to push to http://repo.or.cz/w/silverstripe-elijah.git
git-checkout -b tiny_mce2
git push git+ssh://repo.or.cz/srv/git/silverstripe-elijah.git tiny_mce2
Pust to git repo:
push git+ssh://repo.or.cz/srv/git
Committing (I use Cogito so I can use a commit-post hook for CIA)
Can use cg-commit, cg-diff, etc, like SVN. :)
or
git push git+ssh://repo.or.cz/srv/git/silverstripe-elijah.git delete-fixes
Manually send a commit notification to CIA (if you have that setup in a post-commit hook):
./.git/hooks/post-commit 0c4a5bd941eba3d67cad67d6287b89677b775c24 delete-fixes
View commits:
git-log
Commit to SVN:
git-svn dcommit
List branches:
git branch
After creating a branch, merge it to master
git-merge delete-fixes
Then delete the branch:
git branch -d delete-fixes
Start web interface:
git-instaweb
Fix "update-index --refresh: command returned error: 1" error
elijahlofgren@kubuntu:~/www/silverstripe-gsoc/cms$ git-svn rebase
.dotest/0002: needs update
...
.dotest/whitespace: needs update
update-index --refresh: command returned error: 1
elijahlofgren@kubuntu:~/www/silverstripe-gsoc/cms$ git-log
commit ac3cf2659cab01afe99e5952c3501d6617b24af7
Author: Elijah Lofgren <elijahlofgren@kubuntu.(none)>
Date: Thu Aug 16 12:49:03 2007 -0500
Merge in SVN stuff
commit d7b488f81157b2143fa2c4a0d76a779af31dbcf3
Author: Elijah Lofgren <elijahlofgren@kubuntu.(none)>
Date: Tue Aug 14 14:37:13 2007 -0500
Fix silverstripe_version
commit 67096a4bd9dec9e4e06b49100fe94600373d8695
elijahlofgren@kubuntu:~/www/silverstripe-gsoc/cms$ git reset d7b488f81157b2143fa2c4a0d76a779af31dbcf3
lang/en_US.php: needs update
elijahlofgren@kubuntu:~/www/silverstripe-gsoc/cms$ cg-commit --no-hooks -m "Fix git lang merge file"
M lang/en_US.php
Committed as d056fe23423ad7f62228c933f36ec1c759d81e95
elijahlofgren@kubuntu:~/www/silverstripe-gsoc/cms$ git-svn rebase
Current branch master is up to date.
Some commands I used when working on SilverStripe:
git-svn rebase (NOT git-svn fetch in order to actually apply new updates to local)
git-svn add
git push git+ssh://repo.or.cz/srv/git/silverstripe-elijah.git tiny_mce2
git-format-patch -o ~/silverstripe/patches/
Automatically notice any modified (but not new) files, add them to the index, and commit, all in one step
Modified: 2008-05-23 10:56:48
git commit -a