Tuesday, June 11, 2013

Backtracking: Git review

ome time ago, I installed git and set up a repository or two for personal projects. My needs were limited to keeping track of what I had done and being able to backtrack if I needed to. Obviously, I've been vastly underutilizing git's capabilities, so today I'm going back through some documentation to brush up my existing skills and to add a few more, specifically checkout and branch.

Thanks again to Jesse, who walked me through branching and checkouts via screenshare on Saturday. Otherwise I had things more or less right: pull updates down, wipe db, settings.php, /php and /config files from sites/default/files. I'll want to set up a nice script to do this for me at some point. Note to self: seriously, list of things to do "later." Takeaways: get a GUI for git, test a branch/checkout, and "git is Sliding Doors." Loved that. Oh and try out Sublime. And find a budget for software. phoo.
  1. Install a git GUI. Git Tower is reputedly the bestest, and in the interest of being on the same page, I think I'll just go with that. Free 30-day trial, yay. I do actually like command line, but for things like branches, it does seem like a more visual interface would be helpful to understand where I am. 
  2. Get totally distracted by WWDC stuff. Lament not having every single piece of new tech as it debuts. 
  3. Do some reading/research. Really should have gone through the Drupal Git Documentation earlier. Very helpful. This video on further git usage (sandbox creation, pushing, etc) will be handy later. Note to self: I need a way to differentiate between these learning posts, there's a bit of overlap. Might as well create an SSH key while I'm here... My interpretation of "Patch" is basically "structured diff merged into existing code." Seems very straightforward.
  4. Start fresh with a new clone of 8.x in Tower, changing directory to user/sites/drupal instead of my documents/[complicated] directory. 
  5. Test making a branch and checking it out - nice folder structure in the sidebar. Not quite sure about adding patches though. It seems to apply, but then I get a bunch of things in the status tab. So do I then commit those to my local branch? Does the curl method I've been using do both? Learning yet more software, I guess. Will have to work on that.
Later: reading through some tasks and instructions on drupalmentoring.org in preparation for tonight's office hours. Ask about task assignment and review. Figure out what the heck less and more are/do.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.