Skip to main content

Command Palette

Search for a command to run...

10 Git commands every developer should know!

Updated
•2 min read•View as Markdown
10 Git commands every developer should know!
A

As a mobile developer, I have a passion for creating innovative and user-friendly applications. With years of experience in developing mobile apps for both iOS and Android platforms, I am well-versed in various programming languages such as Java and Kotlin. I have a strong understanding of mobile development frameworks such as Flutter, and I am constantly exploring new technologies to enhance my skills. I am adept at developing apps for various industries including e-commerce, healthcare. With a keen eye for detail and a customer-centric approach, I am committed to delivering top-quality apps that meet the needs of my clients.

  • GIT CONFIG

GIT CONFIG -GLOBAL USER.NAME "[NAME]"

GIT CONFIG -GLOBAL USER.EMAIL "[EMAIL ADDRESS]"

This is used for to sets the author name and email address respectively to be used with your commits.

  • GIT INIT

GIT INIT [REPOSITORY NAME]

This command is used to start a new repository.

  • GIT COMMIT

GIT COMMIT -M "[TYPE IN COMMIT MESSAGE]"

This is used to records or snapshots the file permanently in the version history.

  • GIT ADD

    GIT ADD [FILE]

    This is used to adds a file to the staging area.

    GIT ADD*

    This is used to adds one or more to the staging area.

  • GIT CLONE

GIT CLONE [URL]

This is used to obtain a repository from an existing url.

  • GIT BRANCH

GIT BRANCH

This is used to lists all the local branches in the current repository.

GIT BRANCH [BRANCH NAME]

This is used to creates a new branch.

GIT BRANCH -D [BRANCH NAME]

This is used to deletes the feature branch.

  • GIT MERGE

GIT MERGE [BRANCH NAME]

This is used to merges the specified branche's history into current branch.

  • GIT PULL

GIT PULL [REPOSITORY LINK]

This is used to eftches and merges changes on the remote server to your working directory.

  • GIT PUSH

GIT PUSH -ALL [VARIABLE NAME]

This is used to pushes all branches to your remote repository.

  • GIT RESET

GIT RESET [FILE]

This is used to unstages the file, but it preserves the file contents.

GIT RESET [COMMIT]

This is used to undoes all the commits after the specified commit and preserves the changes locally.

Thank you.

50 views

More from this blog

Code Bytes

9 posts