DEV Community

Cover image for Git Commands Cheatsheet: Advanced (20+ Git Commands Advanced )

Git Commands Cheatsheet: Advanced (20+ Git Commands Advanced )

aashiya123 on December 27, 2021

If you are working on a project, whether small or large-scale, you need to track every change made within your team space. You can use any software...
Collapse
 
gjorgivarelov profile image
gjorgivarelov

git init and git clone and ...git config are advanced?! Well, what's the beginner level then?

Collapse
 
dkassen profile image
Daniel Kassen

git help

Collapse
 
aashiya123 profile image
aashiya123

Will be coming with those commands also..i mentioned them as per the usage perspective

Collapse
 
aashiya123 profile image
aashiya123
Collapse
 
morphzg profile image
MorphZG

Helpful post, would be better with proper formating. Thanks

Collapse
 
aashiya123 profile image
aashiya123

Sure..will take care next time..

Collapse
 
jnareb profile image
Jakub Narębski • Edited

About the last command: which tar and which version it requires for it to have --exclude-vcs, and why not simply use the git archive command?

Collapse
 
aashiya123 profile image
aashiya123

for using -exclude-vcs, tar 1.34: 6.4.
also, if you want to tar a folder without having the .git files then we use the "--exclude-vcs" instead of git archive. archive will help in archiving the git tracked files. If you want the archive to include the files tracked by git, but not the git repository itself or any generated or otherwise untracked file, then use git archive.

Hope it helps

Collapse
 
jnareb profile image
Jakub Narębski

Ah, so the choice between using tar and using git-archive is whether we want to include untracked files, like generated files, in the archive.

Thread Thread
 
aashiya123 profile image
aashiya123

right..

Collapse
 
andrewbaisden profile image
Andrew Baisden

There are always so many GIT commands to remember 😂

Collapse
 
saroj8455 profile image
Saroj Padhan

Thank you

Collapse
 
yassine_dotma profile image
web developer

Thanx

Collapse
 
joelwmulongo profile image
Joel Mulongo Wambulwa

Nice

Collapse
 
mustapha3341 profile image
arewa_coder

Nice article

Collapse
 
rajshiikhar1691999 profile image
Rajshiikhar1691999

I wanted to know what happens if I delete the local git repository...

Collapse
 
shivamjoker profile image
Shivam

Please change the title to git basics 🙏

Collapse
 
azlan_syed profile image
Azlan-Syed

Well Thanks Alot You Nailed It 👍🏻