Git Commands

less than 1 minute read

In this post we will look the very basic commands needed for Git based version control.

Clone repository

git clone cloning_address

Display the status

git status

Optional adding user name and email

git config user.name username
git config user.email useremail

Add all files to the repository

git add *

Add and remove the files accordingly

git add -A

Commit changes with a custom message

git commit -m "commit message"

Push changes to the repository

git push

pull repository to the current directory

git pull

Check configured username and email

git config user.name
git config user.email
list all
git config --list

Tags: ,

Categories:

Updated:

Comments