git submoduleThis command is used to manage separate repositories embedded within a Git repository.To add a submodule to your main repository, use:git submodule add https://github.com/username/submodule-repo.git path/to/submoduleAdvanced Git Commands...
git submodule update --init --recursive # 已删除补丁 (patch) 如果某人在 GitHub 上给你发了一个 pull request, 但是然后他删除了他自己的原始 fork, 你将没法克隆他们的提交 (commit) 或使用 git am 。在这种情况下,最好手动的查看他们的提交 (commit),并把它们拷贝到一个本地新分支,然后做提交。 做完...
$ git submodule update --init View status of all submodules: $ git submodule status Update submodules after switching branches: $ git submodule update Add a submodule: $ git submodule add git://github.com/tpope/vim-sensible.git bundle/vim-sensible Update all submodules to latest remote versio...
Git Submodule Use Cases Git submodule is a valuable command to have in your toolbox for a variety of situations. Not only does it allow you to reuse code from other projects, but you are grabbing a snapshot of a commit. This means you can continue working on the repository from which ...
These are common Git commands used in various situations: start a working area (see also: git help tutorial) clone Clone a repository into a new directory init Create an empty Git repository or reinitialize an existing one work on the current change (see also: git help everyday) ...
Git Cheat Sheet Download our free cheat sheet for Git. Because even with a GUI application at hand, there are times when you resort to the command line… and it's impossible to memorize all the important Git commands! Diff Tools on macOS A diff tool comes in handy to understand the ...
git submodule init git submodule update when changing branches you might need to run git submodule update again if submodules have changed make some changes to files check the status git status This should point out there are untracked files, or that some files have changed and need to be ...
No need to remember all those commands and parameters: get our popular "Git Cheat Sheet" - for free! Download Now for FreeUnderstanding how "checkout" worksWith the "git checkout" command, you determine which revision of your project you want to work on. Git then places all of that revi...
建议安装 Git Bash 这个 git 的命令行工具。 Mac 环境安装 在Git 官方下载地址下载 mac 安装包。按照安装向导安装即可。 配置 Git 自带一个git config的工具来帮助设置控制 Git 外观和行为的配置变量。 这些变量存储在三个不同的位置: /etc/gitconfig文件: 包含系统上每一个用户及他们仓库的通用配置。 如果使用...
Visit this Git commands cheat sheet to learn common Git commands like clone, push, pull, branch, etc.