最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

[未解决]如何从github中用git命令下载指定的版本

Git crifan 3114浏览 0评论

折腾:

[未解决]linphone-iphone编译出错:The document “ShopView.xib” requires Xcode 8.0 or later

期间,需要去下载项目:

BelledonneCommunications/linphone-iphone: Linphone.org mirror for linphone-iphone (git://git.linphone.org/linphone-iphone.git)

中特定的版本:

Commits · BelledonneCommunications/linphone-iphone

-》

assistant: improve UI · BelledonneCommunications/linphone-iphone@280bed6

完整的id是:

280bed6affba63650760cfa2446c352da6dd254c

参考:

[已解决]下载git中之前的某个版本

git clone some commit

Git clone particular version of remote repository – Stack Overflow

->

git clone [remote_address_here] my_repo
cd my_repo
git reset –hard [ENTER HERE THE COMMIT HASH YOU WANT]

git – How to get certain commit from GitHub project – Stack Overflow

git 下载某个commit版本

如何在 GitHub 下载某个程序的特定版本(代码)? – 知乎

使用git 下载指定版本 – 路雷米的日志 – 网易博客

在 Git 中 Checkout 历史版本 | 始终

git取出某个版本某个特定的文件 – Remember To Forget的日志 – 网易博客

去试试git checkout加上commit值,结果不行:

➜  280bed6affba63650760cfa2446c352da6dd254c git checkout 280bed6affba https://github.com/BelledonneCommunications/linphone-iphone
fatal: Not a git repository (or any of the parent directories): .git

结果去下载的地方,也不行:

➜  linphone-iphone git:(master) ✗ pwd 
/Users/crifan/dev/dev_src/swift/SIP/linphone-iphone/linphone-iphone
➜  linphone-iphone git:(master) ✗ git checkout 280bed6
error: pathspec ‘280bed6’ did not match any file(s) known to git.
➜  linphone-iphone git:(master) ✗ git status          
On branch master
Your branch is up-to-date with ‘origin/master’.
Changes not staged for commit:
  (use "git add <file>…" to update what will be committed)
  (use "git checkout — <file>…" to discard changes in working directory)
    modified:   linphone.xcodeproj/project.pbxproj
no changes added to commit (use "git add" and/or "git commit -a")
➜  linphone-iphone git:(master) ✗ git reset –hard 280bed6affba
fatal: ambiguous argument ‘280bed6affba’: unknown revision or path not in the working tree.
Use ‘–‘ to separate paths from revisions, like this:
‘git <command> [<revision>…] — [<file>…]’

https://github.com/BelledonneCommunications/linphone-iphone/commits/master

->

BelledonneCommunications/linphone-iphone at 280bed6affba63650760cfa2446c352da6dd254c

https://github.com/BelledonneCommunications/linphone-iphone/tree/280bed6affba63650760cfa2446c352da6dd254c

280bed6

转载请注明:在路上 » [未解决]如何从github中用git命令下载指定的版本

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
90 queries in 0.228 seconds, using 22.11MB memory