[英]git branches from browser
I've just created a git branch using 我刚刚使用创建了一个git分支
git checkout -b develop
But when I browse the project using the browser I don't see it in 但是当我使用浏览器浏览项目时,我看不到它
../my-app/branches
I'm not too sure what you call "the browser". 我不太确定您所说的“浏览器”。
Git is not SVN. Git不是SVN。 You won't see a sub-folder for each branch appear explicitly in your source tree.
您不会看到每个分支的子文件夹都明确显示在源代码树中。 Nothing there will be visible to a non-Git-aware browser.
不支持Git的浏览器看不到任何内容。 These details will be hidden in
.git/refs/heads
, and you won't need to dig that up for normal use. 这些详细信息将隐藏在
.git/refs/heads
,您无需进行常规使用即可进行挖掘。
On the command-line, just type git branch
. 在命令行上,只需输入
git branch
。 If you see develop
in the list that shows up, the branch exists in the local repository. 如果在显示的列表中看到“
develop
”,则该分支存在于本地存储库中。 If a star is shown on the same line, then it's currently checked out. 如果同一行显示了一个星星,则表示当前已将其检出。
If you're talking about the GiTK browser (also labelled as Git GUI), there's a "Branch" menu. 如果您正在谈论GiTK浏览器(也称为Git GUI),则有一个“分支”菜单。 Click Branch / Checkout, and see what's there.
单击分支/签出,然后查看其中的内容。
(such as Gogs, Github, etc.) (例如Gogs,Github等)
On a web app that lets you navigate a remote, typically branches will show in a drop-down menu that, by defaults, is set to master
. 在允许您导航到远程的Web应用程序上,分支通常会显示在默认情况下设置为
master
的下拉菜单中。 But for your new branch to be visible there, you'll need to have pushed it : git push -u origin develop
. 但是要使新分支在那里可见,您需要将其推送:
git push -u origin develop
。
I can't recommend enough reading the Git Book. 我不推荐阅读足够的Git书。 Here's the chapter that explains branches .
这是解释分支的章节 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.