DEV Community

bagavath ravichandran
bagavath ravichandran

Posted on

2 1 1 1 1

COMMANDS IN GIT

Here are a few Git commands that are going to be used in the terminal as follows,

1.git add (eg:text.txt)

  The git add command adds a specific (text.txt) file from  
  working directory to the staging area.
Enter fullscreen mode Exit fullscreen mode

2.git status

 The git status command displays the state of the working 
 directory and the staging area.
Enter fullscreen mode Exit fullscreen mode

3.git restore --staged (eg:text.txt)

  For example If you have staged  the (text.txt)files with the 
  git add command that you later decide not to commit, you can 
  unstage these changes using this command.
Enter fullscreen mode Exit fullscreen mode

4.git add.

  This command will not add a specific file but it will  add 
  all modified and untracked files to the staging area.
Enter fullscreen mode Exit fullscreen mode

5.git push

  The git push command is used to upload local repository 
  content to a remote repository. Pushing is how you transfer 
  commits from your local repository to a remote repository.
Enter fullscreen mode Exit fullscreen mode

6.git log

  git log lists the commits made in the local repository.
Enter fullscreen mode Exit fullscreen mode

7.git log --oneline

  This command will display each commit on a single line.this 
  will be very useful for a project overview
Enter fullscreen mode Exit fullscreen mode

8.git pull

  The git pull command is used to fetch and pull the 
  content from a remote repository to the local 
  repository.
Enter fullscreen mode Exit fullscreen mode

Heroku

Deploy with ease. Manage efficiently. Scale faster.

Leave the infrastructure headaches to us, while you focus on pushing boundaries, realizing your vision, and making a lasting impression on your users.

Get Started

Top comments (0)

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay