LOL. Yeah, pretty true.
LOL. Yeah, pretty true.
LOL. Yeah, pretty true.
Easy:event.target.className.split(” “)[0]; //0 to retrieve first class
Dealing with a specific branch outside of the master that you want to review? One with a lot of work merged in from various progress? The trick is to look at only those commit logs that distinguish it from the branch you want to merge it in to.
git log oldbranch ^newbranch –no-merges
Will let you see just the logs that are on oldbranch that aren’t on newbranch. Nifty!
git fetch origin
git reset –hard origin/master
I’ve known this one for a while, but worthwhile to write it down as a way to reset branch state. This can be especially important if you’ve had to do a few rebases in the past and the current history doesn’t match commit IDs with the new (origin) history.
git clean -f -d –dry-run
Remove unstaged files with -f, also directories with -d. Preview the process before you do it with –dry-run.