DEV Community

Cover image for Github Commands.
Areeba Farooq
Areeba Farooq

Posted on

2

Github Commands.

When I started using git 3 years ago, I found it very confusing. It had over 100 commands that came with arguments/options.

After a while, I realized that I didn't have to learn them all to hit the ground running in most teams.

This was how I understood the commands I used often:

  • git status - where am I? what has changed?
  • git clone - copy an upstream repository into a local folder
  • git init - start tracking this folder or create a new git repository.
  • git checkout - branch away to a new or existing branch.
  • git add - prepare my most recent code changes for my next commit.
  • git commit - advance added changes to be ready for publishing.
  • git push - publish committed changes.
  • git pull - get me an updated version from upstream.
  • git merge - combine branches (local).
  • git branch - switch branches.
  • git diff - what is happening?
  • git log - what has happened?
  • git restore - undo changes

Feel free to add yours :)

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay