Pew Pew Laser Blog

Code. Glass art. Games. Baking. Cats. From Seattle, Washington and various sundry satellite locations.

Pew Pew Laser Blog Archives — by Blog ID

Quick and Dirty Git Tricks 2.

8.4.2013

Here are some more handy git commands, which I use frequently.

git checkout -b [new-branch]
Create a new branch, check it out, and move all un-staged changes into that new branch. This is perfect for when you've just started some changes, and then remembered that these changes should really go into their own branch.
git add -A
Add all changed, added and deleted files in path to repo.
git checkout [filename]
Throw away any uncommitted changes to a file by getting a new one from index.
git show [hash]
Details about a commit, including files changed and the actual changes. [hash] should be the actual ID of the commit, which you can get from git log.

Permalink

Tags: git

Authorized users may log-in to leave a comment.

Last Blog: Important Life Lessons.

Next Blog: HTML Reprieves.