
Forking Repos & Rocking Git
Git Tips will be posted here *soon*
-promised on 10/9
-updated on 10/17
Crash Course w/ Git Guru, Jeff Felcher
Sidenotes:
*Get git x from him after lesson (email)
-Git X lets you visually see what’s going on
–> This is important when learning to use GIt
*Lesson will be up on GItHub
Key Takeaways:
USE ALIASES
–Use for common commands to cut out steps
–Ex: git aa = git add -A .
NEVER, EVER FORCE
–Force pushing should only be used when rebasing
–>Use ‘fetch’ when command line recommends force (never, ever use force!)
—>fetch will never cause you problems
DONT TRUST GIT STATUS
–Will only be as up to date as the last fetch
Other Notes:
-Git isn’t special
-Origin isn’t “Git” and isn’t special
origin really just means 'remote branch'
-Master isn’t special
master really just means 'local branch'
-Stash lets you put your current work state to the side for the moment (like to fix bugs in the meantime)
–>Stashes are based on a specific branch but can be pasted onto a different branch; they’re global
-gems usually global thing for that repo, so as long as they’re installed rails is happy?
–>Just reinstall if terminal tells you to
-Rebasing: copy specific commits to a different branch (versus merging)
-Pull will do a fetch if it has to, fetch won’t, thus, fetch is always safe and pull is not
-Git works like a web browser, keeping your movement history forever…slash until you remove them from ref or your 30 days is up
-Delete branches when not needed any more – whether local or remote – don’t want to look through lots of branches when you are trying to get to a specific one
git reflog: shows all your movement, help retrace steps when issues come up
“If you’re going to be a professional you need t have good tools.”
–>Try Kaleidescope? for merge issues
Git To-Do List:
-look up merge bubble/bowl?
-look up fast forward merge
-look up git infographic or make one
-start making aliases (just search git alias creation)
-run git stash drop to get rid of all the random stashes you’ve made out of no other choice