Posts Tagged Git
Remove and ignore dreamweaver dwsync.xml files from your GIT repo
Posted by admin in Web design & development on August 30, 2011
git ignore dreamweaver dwsync.xml files (and other gubbins as required)
-
Remove any files already added form the working directory. For example:
$ git rm -f *dwsync.xml -
set up your a global git ignore file
create a gitignore file in your home directory. eg:
$ printf "dwsync.xml\nThumbs.db\n" >> ~/.gitignoreusing git config add this to you git prefs
$ git config --global core.excludesfile ~/.gitignore
For repos that may be worked on by multiple users you should also create this file at the root of your working directory.
References
hcodep://jqr.github.com/2009/02/03/global-git-ignore.html
hcodep://help.github.com/ignore-files/
Rollback a GIT commit
Posted by admin in Web design & development on April 28, 2011
GIT is great, Git is good.
I mostly use git to track changes (very useful to check on what I’ve been up to when it’s late in the night!) but occasionally I need to use it to roll back to a previous commit. This is the command I always forget, and today it took me more than one minute to find the answer (or formulate the right question) on google.
The answer, unsurprisingly on stackoverflow: in your [git tracked] working directory enter this terminal command:
git reset --hard <tag/branch/commit id>
Where you replace the gubbins inside the angle brackets with the SHA ID of your commit. Find this easily using GitX or my potential new favourite GIT client on the Mac: Gitti.
Using GIT to manage a website…
Posted by admin in Asides, Web design & development on February 21, 2011
Nice little write-up on pushing your local GIT repo to a live web site: http://toroid.org/ams/git-website-howto