我试图恢复分支上的最新提交(由其他人完成)。我正在使用TortoiseGit客户端。当我点击"通过此提交还原更改"时,git提供两个选项:Parent1
和Parent2
。这是什么意思?什么是Parent1,什么是Parent2?
答案 0 :(得分:9)
git中的每次提交都至少有一个父级(第一次/初始提交除外)。提交的父级是前一个。
Android.Net.Uri uri = Android.Net.Uri.Parse("http://www.google.com/#q=fish");
var intent = new Intent(Intent.ActionView, uri);
StartActivity(intent);
C1是初始提交。 C2是第二个。 C1是C2的父级。同样适用于C3。
合并提交是父母数量意义上的特殊提交。
C1 <- C2 <- C3
C6是合并提交。它有两个父母,C3和C5。如果你在C5时合并了两个分支(提交):C5被称为父1(第一个父),C3是父2(第二个父)。
答案 1 :(得分:4)
您似乎正在尝试在分支中恢复合并提交。合并提交具有两个父项,一个用于合并中涉及的每个分支。您需要选择要保留的父历史版本。您应该检查每个父母,并决定您要保留哪一个。最有可能的是,您可能希望保留void start_connect(tcp::resolver::iterator endpoint_iter)
{
try
{
if (endpoint_iter != tcp::resolver::iterator())
{
drill_debug_info("trying to connect %s \n",name.c_str());
// Set a deadline for the connect operation.
deadline_timer_.expires_from_now(boost::posix_time::seconds(10));
// Start the asynchronous connect operation.
socket_.async_connect(endpoint_iter->endpoint(),
boost::bind(&dvr_obj::handle_connect,
this, _1, endpoint_iter));
}
else
{
// There are no more endpoints to try. Shut down the client.
connectivity = false;
}
} catch (int e) {
connectivity = false;
}
}
分支中显示的父提交。这应该是下拉列表中的php7
选项。
Parent 1