Xcode中的Git(无分支) [英] Git (no branch) in xcode

查看:51
本文介绍了Xcode中的Git(无分支)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的ios项目中,我将git用作scm.存储库的Xcode列表包括(至少由xcode称为)(无分支)".前一段时间,我可能签出了先前的提交,而没有创建分支.从那时起,我已经提交了40篇文章.现在,我想从我的下一个提交分支.我有点担心会发生什么,并想知道如何恢复到某种体面的分支结构.

In my ios project I use git as scm. Xcode listing of repositories includes something called (by xcode at least) "(no branch)". Some time ago I probably checked out a previous commit, without creating a branch. Since then I have made some 40 commits. Now I want to branch from my next last commit. I am a little worried what might happen and want to know how to get back to some decent branch structure.

推荐答案

当您处于独立状态时,您做了一些提交.您仍然可以创建一个新分支,该分支将指向分离头的尖端:

You did some commits while being in a detached head. You can still create a new branch that will point to the tip of the detached head:

 git checkout -b my_new_branch

这将创建并签出新分支.

This will create and checkout the new branch.

这篇关于Xcode中的Git(无分支)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆