大约有 2,878 项符合查询结果(耗时:0.0194秒) [XML]
How to list all Git tags?
...
git tag
should be enough. See git tag man page
You also have:
git tag -l <pattern>
List tags with names that match the given pattern (or all if no pattern is given).
Typing "git tag" without arguments, a...
How do I update my bare repo?
...plicate all the objects from the main repo, do this inside the main repo:
git push --all <url-of-bare-repo>
Alternatively, do a fetch inside the bare repo:
git fetch <url-of-main-repo>
You cannot do a pull, because a pull wants to merge with HEAD, which a bare repo does not have.
...
Could I change my name and surname in all previous commits?
...
Use git-filter-branch.
git filter-branch --commit-filter 'if [ "$GIT_AUTHOR_NAME" = "Josh Lee" ];
then export GIT_AUTHOR_NAME="Hobo Bob"; export GIT_AUTHOR_EMAIL=hobo@example.com;
fi; git commit-tree "$@"'
This only affect...
How to use Git?
...
Have a look at git for designers for great one page article/high level intro to the topic. (That link is broken: Here is a link to another Git for Designers )
I would start at http://git-scm.com/documentation, there are documents and grea...
What's the difference between Git Revert, Checkout and Reset?
...nd projects to a prior state, and don't understand the difference between git revert , checkout , and reset . Why are there 3 different commands for seemingly the same purpose, and when should someone choose one over the other?
...
Delete local Git branches after deleting them on the remote repo
...
The quick way
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d
NB: if you're not on master, this has the potential to delete the branch. Keep reading for the "better way".
Make sure we keep master
You can ensure that maste...
git error: failed to push some refs to remote
...
If the GitHub repo has seen new commits pushed to it, while you were working locally, I would advise using:
git pull --rebase
git push
The full syntax is:
git pull --rebase origin master
git push origin master
With Git 2.6+ (S...
How to convert existing non-empty directory into a Git working directory and push files to a remote
...
Given you've set up a git daemon on <url> and an empty repository:
cd <localdir>
git init
git add .
git commit -m 'message'
git remote add origin <url>
git push -u origin master
...
How to squash all git commits into one?
...king copy. If you want to keep all the commit messages you could first do git log > original.log and then edit that for your initial commit message in the new repository:
rm -rf .git
git init
git add .
git commit
or
git log > original.log
# edit original.log as desired
rm -rf .git
git ini...
How do I show my global Git configuration?
I'd like to show all configured Git sections.
12 Answers
12
...