Hey, Mom! Talking to My Mother #743 - Mastering Git and Git Hub
This is what I am doing tomorrow. I am setting up my own Git Hub to show off the code I have written to future employers.
Short post today. Lots going on. Original content the next two days, though. Conversations tomorrow and then, I hope, my résumés post on Friday. I have been making steady progress on résumés each day. I should be ready.
But tomorrow I set up a Git Hub account and load student code for prospective employers to see.
I could dress this up with more pictures, but, oh well... that's a lot of work.
Mom, I know it's not too exciting for you (or many of my readers), but expect more and more computer-related posts. Remember, this is not my teaching but my study.
FROM - http://www.infoworld.com/article/3205884/application-development/20-tips-for-mastering-git-and-github.html
20 tips for mastering Git and GitHub
The programming world's favorite distributed version control system also lets you find, share, and improve code. Here's how to make Git and GitHub work better for you
Git/GitHub tip No. 1: Clone almost anything
git clonefrom the manual page:
Clones a repository into a newly created directory, creates remote-tracking branches for each branch in the cloned repository (visible using
git branch -r), and creates and checks out an initial branch that is forked from the cloned repository’s currently active branch.After the clone, a plain
git fetchwithout arguments will update all the remote-tracking branches, and a
git pullwithout arguments will in addition merge the remote master branch into the current master branch, if any.
Git/GitHub tip No. 2: Pull frequently
git pullfrequently, you will keep your copy of the repo up to date, and you will have the opportunity to merge your changed code with others’ changes while the merging is easy to understand and accomplish—ideally, when it’s so easy that it can be done automatically. A corollary of this tip is to watch your project status. Many Git clients will automatically show you when you need to update to stay current.
Git/GitHub tip No. 3: Commit early and often
git commitfrom the manual page:
Stores the current contents of the index in a new commit along with a log message from the user describing the changes.
Git/GitHub tip No. 4: Comment your commits as you would have others comment theirs
Git/GitHub tip No. 5: Push when your changes are tested
pushtheir commits: In short, whenever the commits test successfully in a local build. Then the company did a two-day-long merge fest before being able to build and deploy the updated, integrated product.
Git/GitHub tip No. 6: Branch freely
Git/GitHub tip No. 7: Merge carefully
git mergemanual page:
Before applying outside changes, you should get your own work in good shape and committed locally, so it will not be clobbered if there are conflicts. See also
git merge, you aren’t hosed:
If you tried a merge which resulted in complex conflicts and want to start over, you can recover with
git merge —abort.
git mergeis usually
git mergetool, assuming you like to use a GUI for merging. If you’d prefer the old-school method, you can edit the files in conflict with your favorite programming editor, fully remove the
>>>>>>>lines, save the revised files, and
git addeach file you fixed.
Git/GitHub tip No. 8: Stash before switching branches
git statuscommand will tell you all of this if you don’t happen to remember where you were.) All of a sudden you need to work on a bug fix in a production version. You need to switch branches pronto, but you can’t. Your working directory is dirty and you have two hours of work you don’t want to lose.
git stash. Voilà! Now you have all of your changes stored in a WIP (work in progress) branch, and you can switch to the production branch from your clean directory. When you’re done with that, switch back to where you were with
git stash apply.
Git/GitHub tip No. 9: Use gists to share snippets and pastes
Git/GitHub tip No. 10: Explore GitHub
Git/GitHub tip No. 11: Contribute to open source projects
In the spirit of open source software development, jQuery always encourages community code contribution. To help you get started and before you jump into writing code, be sure to read these important contribution guidelines thoroughly...
Git/GitHub tip No. 12: Use editors and IDEs that “git it”
Git/GitHub tip No. 13: Fork a repo
Git/GitHub tip No. 14: Watch projects
Git/GitHub tip No. 15: Follow friends
Git/GitHub tip No. 16: Send pull requests
Git/GitHub tip No. 17: Create and resolve issues
Git/GitHub tip No. 18: Write informative README pages
Git/GitHub tip No. 19: Use Markdown
Git/GitHub tip No. 20: Convert your older repos to Git
git -cvsimportand cvs2git.
- Pro Git book
- Git—the simple guide
- GitHub help
- Get Started with Git
- GitHub for Beginners
- Git Immersion
- Git Community Book
- Git from the bottom up [PDF]
- Git Magic
- A Visual Git Reference
- Atlassian Git Tutorials
Reflect and connect.
Have someone give you a kiss, and tell you that I love you.
I miss you so very much, Mom.
Talk to you tomorrow, Mom.
- Days ago = 745 days ago
- Bloggery committed by chris tower - 1707.19 - 10:10
NOTE on time: When I post late, I had been posting at 7:10 a.m. because Google is on Pacific Time, and so this is really 10:10 EDT. However, it still shows up on the blog in Pacific time. So, I am going to start posting at 10:10 a.m. Pacific time, intending this to be 10:10 Eastern time. I know this only matters to me, and to you, Mom. But I am not going back and changing all the 7:10 a.m. times. But I will run this note for a while. Mom, you know that I am posting at 10:10 a.m. often because this is the time of your death.