Hoja2 Comandos Git
Hoja2 Comandos Git
git diff HEAD Show difference between working directory and last commit.
git config --global
Define the author name to be used for all commits by the current user.
user.name <name> git diff --cached Show difference between staged changes and last commit
git config --global Reset staging area to match most recent commit,
Create shortcut for a Git command. E.g. alias.glog “log --graph git reset
alias. <alias-name> but leave the working directory unchanged.
--oneline” will set ”git glog” equivalent to ”git log --graph --oneline.
<git-command>
Reset staging area and working directory to match most recent
git config --system Set text editor used by commands for all users on the machine. <editor> git reset --hard
commit and overwrites all changes in the working directory.
core.editor <editor> arg should be the command that launches the desired editor (e.g., vi).
git reset --hard Same as previous, but resets both the staging area & working directory to
GIT LOG <commit> match. Deletes uncommitted changes, and all commits after <commit>.
git log --oneline Condense each commit to a single line. git rebase -i Interactively rebase current branch onto <base>. Launches editor to enter
git log -p Display the full diff of each commit. <base> commands for how each commit will be transferred to the new base.
git log --author= git pull --rebase Fetch the remote’s copy of current branch and rebases it into the local
Search for commits by a particular author.
”<pattern>” <remote> copy. Uses git rebase instead of merge to integrate the branches.
git log Show commits that occur between <since> and <until>. Args can be a git push <remote> Forces the git push even if it results in a non-fast-forward merge. Do not use
<since>..<until> commit ID, branch name, HEAD, or any other kind of revision reference. --force the --force flag unless you’re absolutely sure you know what you’re doing.
git log --graph --graph flag draws a text based graph of commits on left side of commit git push <remote> Tags aren’t automatically pushed when you push a branch or use the
--decorate msgs. --decorate adds names of branches or tags of commits shown. --tags --all flag. The --tags flag sends all of your local tags to the remote repo.