Commands Flashcards
git config
allows you to set configuration variables
git config –system
sets configuration variables for every user on the system
git config –global
set configuration variables specific to your user
git config –local
set configuration variables specific to the repository
git –help
git command and a list of the most commonly used Git commands are printed on the standard output.
git clone [localpath]
Clone a working copy of local repository into a new directory
git clone [url] directoryname
Clone a repository into a new directory using a remote server
git commit -m ‘initial project version’
Initial commit to start version-controlling existing files
git add
OR
git add *
racking tool add new file contents to the index, stage files, and to do other things like marking merge-conflicted files as resolved
git status
tool to determine which files are in which state, to determine which files have changed that are staged for the next commit
.gitignore
A gitignore file specifies intentionally untracked files that Git should ignore. Files already tracked by Git are not affected
git diff
Shows you the exact lines added and removed
git diff –staged
OR
git diff –cached
This command compares your staged changes to your last commit
git rm
Remove files from the working tree and from the index. The files being removed have to be identical to the tip of the branch.
git rm –cached
keep the file on your hard drive but not have Git track it anymore