DEV Community

Discussion on: How do you commit in GitHub ?

Collapse
 
georgecoldham profile image
George

New project:

  • Create repo on GitHub
  • git clone <link to my repo>

If working on my own stuff, im lazy and just work in master:

  • Use VS Code git diff view to double check code
  • Add files in VS Code or in terminal using git add . depending on what im doing
  • Write and submit commit message in VS Code or git commit -m "my message"
  • Always in terminal git push

If im working on an actual project i create a branch before that step:

  • git checkout -b "feature/my-branch-name"
  • Steps as above
  • git push

Although on personal projects im actually lazier than I really let on I have aliased it all so:

  • gcm "commit message"
  • gp