My Git personal reference

The Lumber Room

Various git things I’ve had to look up from time to time.

(Always, while doing anything dangerous, have a gitk window open. Look, don’t guess. (Haven’t used gitk in a while.) And if you’re sharing your repository publicly, you can forget about most of the below.)

Git reset

What git reset <commit> does:
* Reset HEAD to the given commit
* (If not --soft) copy this new HEAD to the index
* (If --hard) copy contents of index to working dir

So, for example:
* To “undo commit”: git reset HEAD~1
This resets HEAD to HEAD~1, without copying this new HEAD to the index. So it’s as if you didn’t make the commit. You can go and commit in another branch if you want.

Copy commits from another repository

Note that you don’t need to specify the remote’s name for cherry-picking. Once you have fetched, all…

View original post 358 more words

Advertisements

About ege's press.

Few things. I'm lizard king i can do anything. Let's start this shit. mpla mpla mpla de mas pernei gia polla. (greeklish) System learn greeklish. Learn to use your Keyboard shortcuts makes your life easier.Inside time άλλωστε... εμείς είμαστε ...
This entry was posted in Coding and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s