使用powershell命令

时间:2016-10-01 12:10:41

标签: git powershell

windows powershell中是否有一个简单的命令来从git远程存储库中获取最新代码?我已经安装了git posh

注意:

  1. git和powershell都是新手。
  2. 创建存储库。我只是想从远程分支获取代码,以便我想在powershell脚本的下一步中使用ms构建工具进行构建。

1 个答案:

答案 0 :(得分:1)

您可以使用git clone

git clone <http or ssh address for the repository>

如果你已经克隆了回购,你需要检查分支然后拉它。

git checkout <branch name>
git pull

如果您没有可从远程办理结账的分支机构:

git fetch origin

通过以下方式查看可用于结帐的分支:

git checkout -v -a