0% found this document useful (0 votes)
30 views1 page

Gitche at

The document provides instructions for using basic Git commands like configuring user information, adding and committing files, checking status, viewing logs and diffs, branching, merging, ignoring files, pushing to and cloning from remote repositories.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views1 page

Gitche at

The document provides instructions for using basic Git commands like configuring user information, adding and committing files, checking status, viewing logs and diffs, branching, merging, ignoring files, pushing to and cloning from remote repositories.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

git config --global user.

name ""
git config --gloabl user.email ""
git config --global --replace-all user.name ""

git init
git add FILENAME stage file
git add -A stage ALL fileS
git commit -m ""
git commit -a -m ""
git status
git status -s

git checkout FILENAME


git checkout -f
git log
git log -p -1

git diff
git diff --staged

git rm --staged
git rm deletes from git n hard disk

touch .gitignore

git branch BRANCHNAME


git branch to view branches
git checkout BRANCHNAME to change branch
git merge BRANCHNAME inside main branch to merge feature1 branch
git checkout -b BRANCHNAME to create and switch to new branch

----create a private repo---


git remote add origin URL OF REPO
git remote = origin to check
-->settings ssh keys-->new ssh key-->go to help section and generate new ssh key

ssh-keygen -t ed25519 -C "imdengkhw@gmail.com" generate


eval "$(ssh-agent -s)" deploy
ssh-add ~/.ssh/id_ed25519
cat ~/.ssh/id_ed25519.pub
copy the key for eg
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKVP/xDoDIPGkdQ0fyRygWmu0SIl3kkM9UT+5sVNjHeG
imdengkhw@gmail.com
paste in add ssh keys in github profile and keep the name of your pc

git push -u origin master use -u to set default


git push
git clone URL

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy