从上游结账无法获得正确的来源

时间:2018-04-24 07:21:28

标签: git github bitbucket

尝试了这个git checkout -b staging upstream/staging,但我无法获得上游登台分支的源代码。

我需要重置还是我做错了什么? 我想要的是上游/分期的干净副本。

2 个答案:

答案 0 :(得分:1)

x <- c("abc", "12") y <- c("bc", "123", "nomatch") bool_mat <- sapply(x,function(z) grepl(z,y)) | t(sapply(y,function(z) grepl(z,x))) x1 <- x[!apply(bool_mat,2,any)] # character(0) y1 <- y[!apply(bool_mat,1,any)] # [1] "nomatch" 创建一个名为&#34; staging&#34;的新分支。从&#34;上游/分期开始&#34; point - 但git checkout -b staging upstream/staging不会拉或取。你从那里开始运行git checkout吗?

答案 1 :(得分:0)

更新本地存储库

# fetch all changes from remote (not a must but a best practice)
git fetch --all --prune

# now checkout the desired branch from an origin or from any other remote
git checkout -b <branch name> <remote name>/<remote branch name>

enter image description here