└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # GitHub-For-Noobs-Community-Tips 2 | #### This Repo is a collection of great tips and references from the comments found in the GitHub for Noobs Series 3 | 4 | https://www.youtube.com/playlist?list=PLqGj3iMvMa4LFz8DZ0t-89twnelpT4Ilw 5 | 6 | 7 | _Community Contributions_ 8 | 9 | --- 10 | 11 | **Scott Nimos** 12 | 13 | `atom ./*` opens all the files in the directory in Atom at once. 14 | 15 | --- 16 | 17 | **Marcel Robitaille** 18 | 19 | You can also just type `git push`. if there is no upstream, git will prompt you to do the command with `--set-upstream`. 20 | 21 | --- 22 | 23 | **Steven Kemp** 24 | 25 | You can use GitHub's `hub` command line wrapper. [github.com/github/hub](https://github.com/github/hub). 26 | You can type in `hub pull-request` to make a pull request from the command line. 27 | 28 | --- 29 | 30 | **David Awsom** 31 | 32 | Check this "terminal reviser tool": [github.com/nvbn/thefuck](https://github.com/nvbn/thefuck) 33 | It can correct your last command, executing the `fuck` command. For example, if you execute `git brnch` literally, obviously the output will be a syntax error. Then enter `fuck` and whoala, it will execute the last command without syntax errors! Helps a lot when one is very tired. 34 | 35 | --- 36 | 37 | **Devin Chaves and ceghap** 38 | 39 | I always do `git add .` to add all files to staging stage. 40 | 41 | > **Marcel Robitaille** 42 | 43 | > I don't think that adds deleted files. I like `git add -A` 44 | 45 | --- 46 | 47 | **Sean Holdbrook** 48 | 49 | A best practice for commit messages is to explain why you are committing over what you are committing. A git diff can tell you what changed so a message should explain the reason for the changes. Something like "we didn't like the gray background so we made it lavender" instead of "bg-color from gray to lavender" 50 | 51 | --- 52 | 53 | **segni bechir** 54 | To Push a new branch : `git push -u BranchName` 55 | To Commit and add Same Time : `git commit -am "you comment"` 56 | To Add all the files without a commit : `git add .` 57 | To Merge a Branch into master : 1: `git checkout master -> git merge BranchName` 58 | 59 | ---- 60 | 61 | **MUSTBENICE** 62 | 63 | Ever heard about git-flow? Make sure to google that, it's a great extension for git ^^ 64 | 65 | --- 66 | 67 | **Ratik Sharma** 68 | 69 | Fun fact: newer versions of git allow you to execute `git status` using `git s`. There is more to these shorthands. Check 'em out! 70 | 71 | --- 72 | 73 | **Andreas Storesund Madsen** 74 | 75 | You can write `git commit -am "message"` instead of `git commit -a -m "message"` 76 | --------------------------------------------------------------------------------