Git commands Flashcards
Shortcuts
1
Q
What does touch command do ?
A
This command creates a new file
touch file.txt
note you can create a file inside another file, but the path must be clear.
example
touch pets/horses/rocky.png
2
Q
What are the following commands pwd cd ls ls -a mk dir rm rm -r rm -rf
A
print working directory change directory list files in directory list hidden directory make directory remove file remove a directory remove .git
3
Q
How do we amend commits ?
A
git commit -m
4
Q
What is .git ignore ?
A
It is a command that we use, not include some files in our repo or working directory