大约有 2,878 项符合查询结果(耗时:0.0211秒) [XML]
How do you stash an untracked file?
I have changes to a file, plus a new file, and would like to use git stash to put them away while I switch to another task. But git stash by itself stashes only the changes to the existing file; the new file remains in my working tree, cluttering up my future work. How do I stash this untracked fi...
Automatic prune with Git fetch or pull
...d a remote branch because the work is over and I don't know, I won't do a git fetch --prune and eventually I will push back the deleted branch.
...
How to filter git diff based on file extensions?
Is there an option to restrict git diff to a given set of file extensions?
9 Answers
...
List of remotes for a Git repository?
I have a Git repository. This repository has multiple remote repositories (I think). How can I get a list of the remote repositories that belong to said repository?
...
How to programmatically determine the current checked out Git branch [duplicate]
...e.g. a Linux distro, Cygwin, OSX), what is the best way to determine which Git branch is currently checked out in a working directory?
...
Is it possible to move/rename files in Git and maintain their history?
I would like to rename/move a project subtree in Git moving it from
14 Answers
14
...
Git: How to update/checkout a single file from remote origin master?
...
It is possible to do (in the deployed repository)
git fetch
git checkout origin/master -- path/to/file
The fetch will download all the recent changes, but it will not put it in your current checked out code (working area).
The checkout will update the working tree with th...
Keep ignored files out of git status
I would like to stop Git from showing ignored files in git status , because having tons of documentation and config files in the list of Changed but not updated files, renders the list half-useless.
...
What is the precise meaning of “ours” and “theirs” in git?
...les (becomes backwards) when you are doing a rebase.
Ultimately, during a git merge, the "ours" branch refers to the branch you're merging into:
git checkout merge-into-ours
and the "theirs" branch refers to the (single) branch you're merging:
git merge from-theirs
and here "ours" and "theirs...
How can I check in a Bash script if my local Git repository has changes?
... meant was:
if [ -n "$CHANGED" ]; then
VN="$VN-mod"
fi
A quote from Git's GIT-VERSION-GEN:
git update-index -q --refresh
test -z "$(git diff-index --name-only HEAD --)" ||
VN="$VN-dirty"
It looks like you were copying that, but you just forgot that detail of quoting.
Of course, you could ...