git config --global user.name "Fulano de Tal"
git config --global user.email [email protected]
git commit -m "Lorem ipsum"
git commit -m "Lorem ipsum dolor sit amet" --amend
git push origin branch-name
- Download commits from remote branch
git pull origin branch-name
- Using tool to merge branches
- Remove the file from the Git repository and the filesystem
- Remove the file only from the Git repository and not remove it from the filesystem
- Undo commits, but does not touch the index file or the working tree at all
git reset --soft branch-name
- Undo commits permanently and also throw away any uncommitted changes
git reset --hard branch-name
- Undo the most recent local commits while leaving your working tree (the state of your files on disk) untouched
- Untrack a file that has been committed
git rm -r --cached file-name
- Checking logs of specific file
git log -p file-name
git log --graph --oneline --all
- create a branch off from the main branch
git checkout -b nome_branch main
- save modified and staged changes
- list stack-order of stashed file changes
- write working from the top of the stash stack
- discard the changes from the top od the stash stack
- show alterations to be sent
- show alterations in current branch of what is changed but not staged
- show alterations in current branch of what is staged but not yet commited
- show alterations between files in current branch and remote
- show alterations between files in current branch and remote specifying a commit
git diff -p file-name f90b0dd3949..70ad8038d0
git remote set-url origin ssh://git-codecommit.us-east-1.amazonaws.com/v1/repos/foo
- upload a existent repository
git push ssh://git-codecommit.us-east-1.amazonaws.com/v1/repos/foo --all