By default, git config will read configuration options from multiple files: $(prefix)/etc/gitconfig System-wide configuration file. $XDG_CONFIG_HOME/git/config ~/.gitconfig User-specific configuration files. When the XDG_CONFIG_HOME environment variable is not set or empty, $HOME/.config/...
All files with pathnames that do not match any pattern are output last, as if there was an implicit match-all pattern at the end of the file. If multiple pathnames have the same rank (they match the same pattern but no earlier patterns), their output order relative to each other is ...
Create an archive of files from a named tree git-bisect[1] Use binary search to find the commit that introduced a bug git-branch[1] List, create, or delete branches git-bundle[1] Move objects and refs by archive git-checkout[1] Switch branches or restore working tree files...
You can repeat steps 2-4 multiple times to break the original code into any number of commits. Now you’ve split out many of the changes into their own commits, and might no longer use the patch mode ofgit add, in order to select all remaining uncommitted changes. ...
It is beyond the scope of this book to get into the details of multiple.gitignorefiles; seeman gitignorefor the details. Viewing Your Staged and Unstaged Changes If thegit statuscommand is too vague for you — you want to know exactly what you changed, not just which files were chang...
git restore --staged . git restore . Again, if the files aren’t staged you only need to run git restore .. If you need to revert a bunch of files in a specific directory but you don’t want to operate on every file you can run git restore --staged mydir/. Basically you can...
frustrated that they don’t know how to shrink their repo and remove the old stuff. If unlucky, they merge old and new history and end up with multiple "copies" of each commit, some of which have unwanted or sensitive files and others which don’t. This comes about in multiple ...
it cannot be used to follow multiple files and does not work well on non-linear history. log.showRoot If false, git log and related commands will not treat the initial commit as a big creation event. Any root commits in git log -p output would be shown without a diff attached. The...
5.22 git restore 5.23 git reflog 5.24 git stash 5.25 git submodule 5.26 git subtree 5.27 git cherry-pick 5.28 git grep 5.29 git apply 5.30 git cat-file 5.31 git ls-files 5.32 git merge-file 6. Git重要术语列表 1. Git概述 当我们开发软件的时候,会创建很多源代码文件,这些源代码文件一般会...
Switch branches or restore working tree files git-cherry-pick[1] Apply the changes introduced by some existing commits git-citool[1] Graphical alternative to git-commit git-clean[1] Remove untracked files from the working tree git-clone[1] ...