0% found this document useful (0 votes)
2 views2 pages

GIT Notes

git related info

Uploaded by

Manisha Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

GIT Notes

git related info

Uploaded by

Manisha Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

 git config - -global user.

name “manisha”

set git configuration at global level specifically user name

 git config user.name

give the user name

 git config - -global user.email “[email protected]


 git config user.email
 git init

will convert the current directory into repository.

 ls -a

to see the hidden files or directories

 git status

will just do the comparison between local repo and current working directory/server. Untracked file/s
will be in red color.

 git add file name

make the tracked or changes to be committed. (file name color change from red to green)

 git rm - -cached file name

will untracked the file means convert from green to red.

 git add .

will track all the untracked files.

 git commit -m “comment which we want to give”


OR
git commit
editor will open and add the comment there.
 git log

to view history of commits.

 git diff filename

will show the difference into the specific file

OR

git diff

will show the differences in the files.

 git branch
will tell not only all the present branches but also what is the current branch

 git branch branchname

to create a new branch.

 git checkout branchname

use to change the accessed branch.

 touch .gitignore
vim .gitignore

add all the files which we want to ignore.

git add .gitignore

follow all above steps to ignore the files.

 git merge branchname

merge the branchname with the master branch.

 git tag -a v1.0.0 -m “Version v1.0.0 release”

adding the tag

 git tag

to see all the added tags

NEED TO CHECK

 git cherrypick
 rebase
 git remote update
 git fetch
 git pull
 git push
 git stash
 how to set upstream?

You might also like