Skip to content

Instantly share code, notes, and snippets.

@maschwenk
Created January 6, 2022 02:26
Show Gist options
  • Save maschwenk/0e496cc3e2740253e3f189436db31c8b to your computer and use it in GitHub Desktop.
Save maschwenk/0e496cc3e2740253e3f189436db31c8b to your computer and use it in GitHub Desktop.
Notes for buenito

Shit to setup your computer with

Install oh my zsh

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Put this into your ~./.zshrc file

push_quiet () {
  branch_name=$(git rev-parse --abbrev-ref HEAD)
  git push --quiet --set-upstream origin $branch_name
}
alias g=git
alias gp=push_quiet

Starting from scratch

  1. Clone repo
    • git clone https://github.com/latticehr/lattice.git
  2. Change directory into the cloned repo
    • cd lattice

General daily flow

  1. Get changes from github for this branch
    • git pull
  2. Create a new branch
    • git checkout -b [branch name goes here]
  3. Switch branches (I want to work on a different feature)
    • git checkout [branch name goes here]
  4. Write your new code
  5. See what changes we have on this branch
    • git diff
  6. Stage files to get ready to commit
    • git add [filename]
  7. See what changes are staged
    • git diff --staged
  8. Commit staged changes
    • git commit -m "Message you want to put in the commit
  9. Push changes to github
    • git push --quiet --set-upstream origin [branchname]
  10. Click link in resulting text to setup a PR
  11. Merge on github
  12. Go back to first step 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment