Monday, September 19, 2022

GIT operations in day to day life

 GIT operations

To configure your name and email in your local settings:


# git config --global user.name "Name"

# git config --global user.email "Email"

git config -l


To Clone the git repo:


git clone https://git-url/project.git


To play around the branches :


git branch

git branch -r

git switch <branch-name> 


To push from local repo to git repo:


# git add .

git commit -m "First commit"

git push -u origin <branch-name> 

No comments:

Post a Comment