Copyright © infotec016 . Powered by Blogger.

Saturday, November 9, 2019

Git Commands


To find git version
>> git --version

Initialize a new repository and push
>> git init <repo_name>

Create your files to upload  to the repository created in your machine

To see the status.. It will show the modified files in the directory
>> git status

To add the file
>> git add <file_name>

To commit
>> git commit -m "leave your commit message here"

To see the branch
>> git branch

Add the upstream
>> git remote add upstream <repo_url>

Fetch the changes from upstream to your local repository
>> git fetch upstream master

To push
>> git push

To clone a existing repository in your local machine
>>git clone <repo_url>

To remove a file
>> git rm <file_name>









0 comments:

Post a Comment