to good engineering practices. • Technology Teaching Fellow @MESTAfrica • @PythonGhana Convener • Community Admin @DevCongress Follow me on Twitter @faddai
a lone wolf anymore. • Even if you are, having a copy of your code away from your laptop is wise. • Freedom to try out your wild ideas without messing up
to use git without adding your name and email address. Own your commits. $ git config --global user.email "[email protected]" $ git config --global user.name "Francis Addai"
as possible and if you end up with incoherent commits, make them cohesive by squashing commits using rebase. http://bit.ly/2HInPHI If you are the kind of person that dreads committing often, rebase to the rescue! Don’t think about rebase as an option once your code has been pushed to a remote repository.
commit before things went haywire $ git reflog # assuming we identified 891bef as the commit of interest $ git checkout -b 891bef <branchName> Work on the changes you need to make and merge the branch back into your main branch.
git repo on Dropbox :) ) ▪ git init --bare ▪ no working tree, you can't checkout here • Hooks ▪ enforce adherence to style guides ▪ enforce guidelines for pushing code (all commits must have a reference to an issue # for example) • Submodules • Aliases • Gitflow