git pull之后我得到了这个输出.
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> my_branch
Run Code Online (Sandbox Code Playgroud)
问题是我已经创建了该分支,并在此分支上完成了提交,并切换到其他分支并返回到此分支.比新用户添加了一些提交,之后我收到此消息.
我的问题不是如何解决这个问题我想知道是什么导致这种情况以及如何防止它再次发生.
我知道你可以使用公共领域或其他一些解决方法.或许你根本不需要它们.但出于好奇,为什么Sun离开了建筑物.
我已经尝试了一些测试,如果有所有的点击或错过也没关系.TryGetValue总是更快.什么时候应该使用ContainsKey?
我正在尝试初始化DropDownList,这是我的select方法:
public List<ListItem> metodShownAbove()
{
List<ListItem> initlist = new List<ListItem>();
if (!IsPostBack)
{
initlist.Add(new ListItem("--- all---", "-1"));
initlist.Add(new ListItem("text1", "Value1"));
initlist.Add(new ListItem("text2", "Value2"));
initlist.Add(new ListItem("text3", "Value3"));
}
return initlist;
}
Run Code Online (Sandbox Code Playgroud)
这是在我的aspx页面上:
<asp:DropDownList ID="DDL" runat="server" AutoPostBack="True"
SelectMethod="metodShownAbove"/>
Run Code Online (Sandbox Code Playgroud)
initlist返回我想要返回的内容,文本和值,如上所示.但是,当我试图让所选择的值或文本,DDL.SelectedItem.Value并且DDL.SelectedItem.Text,它是相同的值,在列表项initlist第一个.DDL中没有包含"Value1"的属性.我做错了什么,如何正确插入值,以便我可以读取,值和文本?
我试图比较我从Web服务获得的值,但有时我得到int值,有时我得到字符串.所以我只能检查Type.value1会很棒.
例如:
enum Type { value1 = 1 , value1="one"}
Run Code Online (Sandbox Code Playgroud)
并且喜欢更多的值2等...当然,我不能这样做因为我不能为value1添加两个定义.