Fork me on GitHub
Its the Code garbage collector. Mind dumps of daily coding antics from a frustrated silly little man. VBS, PHP, TCL, TK, PERL, C++, JAVA....what now? Ruby?
No Wait.. It should be just RUBY!


I've been using git for a while and forget some things.. so for the sake of repeating the internet.

Revert Working Copies

For a specific file use:

git checkout path/to/file/to/revert

For all unstaged files use:
git checkout -- .

Make sure to include the period at the end.

Merge in remote

git checkout master
git remote add username git://
git fetch username
git merge username/master-or-branch-name
git push origin master

Update existing remote
shadowbq@thaw:~/snorby_suite$ git remote
shadowbq@thaw:~/snorby_suite$ git fetch origin
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
   33174e0..7109d83  master     -> origin/master
shadowbq@thaw:~/snorby_suite$ git merge origin/master
Updating 33174e0..7109d83
Fast-forward |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

No comments: