Skip to content

Instantly share code, notes, and snippets.

@kongkrit
Last active June 11, 2021 04:30
Show Gist options
  • Save kongkrit/89cefb29159e75d41748b1607cbce597 to your computer and use it in GitHub Desktop.
Save kongkrit/89cefb29159e75d41748b1607cbce597 to your computer and use it in GitHub Desktop.
Github cheat sheet

Use git to work on a github project

  • on web: create project on github
  • on dev machine, cd to dev directory on target machine: git clone https://github.com/username/project1 will pull all files to dev/project1 directory
  • on dev machine, do the following: from here
    • create a per project credential: git config credential.helper store
    • create a global credential: git config --global credential.helper store
    • sudo chmod 755 /home/username/.config
    • set email: git config user.email "[email protected]"
    • generate new personal token using this instructions -- make sure to check boxes on repo and gists
  • edit files / build until working
  • git add file1 file2 file3
  • git commit -m "commit message"
  • git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment