Life & Times of a Female Software Engineer
Posts tagged git
Git Handyism: Reflog
Apr 15th
This just saved my butt.
Say you want to delete a branch:
% git branch -D s-588-test-list-of-urls
BUT THEN YOUR REALIZE YOU DELETED THE WRONG ONE. And you had commits that were local and were not pushed to the main repository, this piece of information is very helpful.
Do a:
% git reflog
And you’ll get something like:
fbfdcea HEAD@{0}: checkout: moving from master to s-588-test-list-of-urls
fbfdcea HEAD@{1}: checkout: moving from b-702-slideshow-play-button-jquery to ma
c87935e HEAD@{2}: checkout: moving from s-588-test-list-of-urls to b-702-slidesh
eaeb971 HEAD@{3}: commit: Writing some looping code to pull urls from sitemap.xm
fe2d942 HEAD@{4}: commit: adding backgroundrb
fbfdcea HEAD@{5}: checkout: moving from master to s-588-test-list-of-urls
fbfdcea HEAD@{6}: checkout: moving from b-702-slideshow-play-button-jquery to ma
c87935e HEAD@{7}: commit: Change how the text buttons are colored
1d233b8 HEAD@{8}: checkout: moving from master to b-702-slideshow-play-button-jq
fbfdcea HEAD@{9}: checkout: moving from b-702-slideshow-play-button-jquery to ma
1d233b8 HEAD@{10}: commit: Slideshows work again with jQuery
f101f15 HEAD@{11}: checkout: moving from 0.8.0 to b-702-slideshow-play-button-jq
87a1769 HEAD@{12}: checkout: moving from b-702-slideshow-play-button-jquery to 0
f101f15 HEAD@{13}: commit: Playing with javascripts and styles
Pick out which revision you last remember you did on your branch and then do this (with a new branch):
% git checkout -b s-588-test-list-of-urls-redo HEAD@{3}
And then checkout the correct repository again:
% git checkout s-588-test-list-of-urls
And do a merge!
% git merge s-588-test-list-of-urls-redo
And breathe a sigh of relief because you saved yourself a panic attack.
Making the Blogenning Easier (Maybe?)
Aug 14th
I’ve been promising this for a while but with regular life and headaches taking over my free time… I have been less than productive. But fear not! I DO have an update. I think I basically have the first version of the “Blogenning” software I’ve been talking so much about right now.
For the time being it will be hosted at http://blogenning.rachelober.com/. Not to be self-serving, but it is easiest for me to update it. I spoke with Brandon and we both thought that if it worked well enough we could each chip in a buck and buy ourselves a proper domain to house the insanity.
Features:
- User login and administration
- Add “rounds”, “entries” for rounds, and “users” for entries
- Main page lists the rounds starting from most recent to oldest entries
On the to do list:
- Registering and password retrieval
- “Special” statuses for “trend setters” and “bastards” (these are inside-jokes for people NOT in the Blogenning)
- API stuff so that a plugin for WordPress and Drupal can add rounds and entries
- User account stuff so you guys can change your password
Also, if you know ruby on rails or want to get in on designing the beast (I refuse to do any complicated CSS for this at this point *looks at Jaco and hopes his artistic sense may help with this one*)… you can join our GitHub site and ask to be put on the development team so you can have some input. Yay!
For the time being only my entries are entered into the database so you’re going to have to add your own damn entries because I’m much too lazy to do everyone’s.
Once I get password retrieval working on the site, I have all of your user accounts made, so then you can just do a password retrieval and your password will be emailed to you.