大约有 2,950 项符合查询结果(耗时:0.0087秒) [XML]
How to “git clone” including submodules?
...
With version 2.13 of Git and later, --recurse-submodules can be used instead of --recursive:
git clone --recurse-submodules -j8 git://github.com/foo/bar.git
cd bar
Editor’s note: -j8 is an optional performance optimization that became availa...
How do I check out a remote Git branch?
Somebody pushed a branch called test with git push origin test to a shared repository. I can see the branch with git branch -r .
...
Switch Git branch without files checkout
Is it possible in Git to switch to another branch without checking out all files?
11 Answers
...
“fatal: Not a git repository (or any of the parent directories)” from git status
...
You have to actually cd into the directory first:
$ git clone git://cfdem.git.sourceforge.net/gitroot/cfdem/liggghts
Cloning into 'liggghts'...
remote: Counting objects: 3005, done.
remote: Compressing objects: 100% (2141/2141), done.
remote: Total 3005 (delta 1052), reused 27...
In plain English, what does “git reset” do?
I have seen interesting posts explaining subtleties about git reset .
7 Answers
7
...
How do I revert all local changes in Git managed project to previous state?
I have a project in which I ran git init .
After several commits, I did git status which told me everything was up to date and there were no local changes.
...
How to extract a git subdirectory and make a submodule out of it?
...
Nowadays there's a much easier way to do it than manually using git filter-branch: git subtree
Installation
NOTE git-subtree is now part of git (if you install contrib) as of 1.7.11, so you might already have it installed. You may check by executing git subtree.
To install git-subtre...
Change date of git tag (or GitHub Release based on it)
I'm adding Releases to my projects on GitHub by adding tags to various commits in the Main branch.
3 Answers
...
Is there a way to get the git root directory in one command?
...
Yes:
git rev-parse --show-toplevel
If you want to replicate the Git command more directly, you can create an alias:
git config --global alias.root 'rev-parse --show-toplevel'
and now git root will function just as hg root.
...
Check if current directory is a Git repository
I am writing a series of scripts for Git management in zsh.
14 Answers
14
...
