Вы находитесь на странице: 1из 1

Git Commands

git init - initiates a new git repository


git status - checks the status of the repository
git add - adds a new file to the repository and begins to track it ('*.txt' -add
s all files with .txt extension)
git commit - commits the changes to the repository (-m, includes a message)
git log - looks at the commits that were being made
git remote add - adds a remote repository you can push your local repository int
o
git push - tells Git where to put the commits (-u, sets parameters)
git pull - pulls down the repository to check for changes
git diff - checks for the differences in changes for the repository (HEAD can be
used to check for more recent commit, --staged to see which ones are on the sta
ged area)
git reset - unstages the files that were just staged
git checkout -- can change back files to their last commit
git branch - makes a new copy of the file for editing purposes (-d to delete bra
nches)
git rm - removes files
git merge - merges two branches (ALWAYS BE ON MASTER BRANCH! CHECK IT OUT FIRST!
)

Вам также может понравиться