Remote Resolution of Git Conflicts
On February 18, 2010,
in IT Related, Ruby on Rails,
by admin
You are attempting to push when you experience a conflict:
[ksedgwic@lap2 bonsai-wiki]$ git push To ssh://ikiwiki@git.bonsai.com/~/public_git/bonsai-wiki.git ! [rejected] master -> master (non-fast forward) error: failed to push some refs to 'ssh://ikiwiki@git.bonsai.com/~/public_git/bonsai-wiki.git'
First, see if the conflict can be automatically resolved:
[ksedgwic@lap2 bonsai-wiki]$ git pull remote: Counting objects: 9, done. remote: Compressing objects: 100% (5/5), done. remote: Total 5 (delta 3), reused 0 (delta 0) Unpacking objects: 100% (5/5), done. From ssh://ikiwiki@git.bonsai.com/~/public_git/bonsai-wiki fe30702..b52b62c master -> origin/master Auto-merged howtos/vcs/git_conflict.mdwn CONFLICT (content): Merge conflict in howtos/vcs/git_conflict.mdwn Automatic merge failed; fix conflicts and then commit the result.
Git status shows that your state is conflicted:
[ksedgwic@lap2 bonsai-wiki]$ git status howtos/vcs/git_conflict.mdwn: needs merge # On branch master # Your branch and 'origin/master' have diverged, # and have 1 and 1 different commit(s) each, respectively. # # Changed but not updated: # (use "git add ..." to update what will be committed) # # unmerged: howtos/vcs/git_conflict.mdwn # no changes added to commit (use "git add" and/or "git commit -a")
IMPORTANT – If you can resolve the conflict do so (normal procedure), this procedure presumes you wish to write the conflicting updates to a branch.
Reset your tree to just your unmerged updates:
[ksedgwic@lap2 vcs]$ git reset --hard HEAD HEAD is now at e1497e3 Changed title.
Create a branch, use a name which suggests a conflict:
[ksedgwic@lap2 vcs]$ git branch master-conflict-20090125 [ksedgwic@lap2 vcs]$ git branch * master master-conflict-20090125
Reset your tree to the prior revision:
[ksedgwic@lap2 vcs]$ git reset --hard HEAD^ HEAD is now at fe30702 started test for creating dual headed branches upon push
Pull the other persons changes:
[ksedgwic@lap2 vcs]$ git pull
Switch back to your branch:
[ksedgwic@lap2 vcs]$ git checkout master-conflict-20090125 Switched to branch "master-conflict-20090125"
Push your conflict branch back to the repoistory:
[ksedgwic@lap2 vcs]$ git push origin master-conflict-20090125 Counting objects: 9, done. Compressing objects: 100% (5/5), done. Writing objects: 100% (5/5), 406 bytes, done. Total 5 (delta 3), reused 0 (delta 0) To ssh://ikiwiki@git.bonsai.com/~/public_git/bonsai-wiki.git * [new branch] master-conflict-20090125 -> master-conflict-20090125 remote: Counting objects: 9, done. remote: Compressing objects: 100% (5/5), done. remote: Total 5 (delta 3), reused 0 (delta 0) From /home/ikiwiki/public_git/bonsai-wiki * [new branch] master-conflict-20090125 -> origin/master-conflict-20090125
complete reference : http://www.bonsai.com/wiki/howtos/vcs/git_remote_resolve/
Ruby on Rails simple tutorials
On February 9, 2010,
in IT Related, Ruby on Rails,
by admin
Dave Matthews Band
On February 9, 2010,
in Music,
by admin
Simple CSS Menu
On February 9, 2010,
in IT Related,
by admin
This is just for future reference ;=)
<html>
<head>
<title>CSS based drop-down menu</title>
<style type="text/css">
ul {
font-family: Arial, Verdana;
font-size: 14px;
margin: 0;
padding: 0;
list-style: none;
}
ul li {
display: block;
position: relative;
float: left;
}
li ul { display: none; }
ul li a {
display: block;
text-decoration: none;
color: #ffffff;
border-top: 1px solid #ffffff;
padding: 5px 15px 5px 15px;
background: #2C5463;
margin-left: 1px;
white-space: nowrap;
}
ul li a:hover { background: #617F8A; }
li:hover ul {
display: block;
position: absolute;
}
li:hover li {
float: none;
font-size: 11px;
}
li:hover a { background: #617F8A; }
li:hover li a:hover { background: #95A9B1; }
</style>
</head>
<body>
<ul id="menu">
<li><a href="">Home</a></li>
<li><a href="">About</a>
<ul>
<li><a href="">The Team</a></li>
<li><a href="">History</a></li>
<li><a href="">Vision</a></li>
</ul>
</li>
<li><a href="">Products</a>
<ul>
<li><a href="">Cozy Couch</a></li>
<li><a href="">Great Table</a></li>
<li><a href="">Small Chair</a></li>
<li><a href="">Shiny Shelf</a></li>
<li><a href="">Invisible Nothing</a></li>
</ul>
</li>
<li><a href="">Contact</a>
<ul>
<li><a href="">Online</a></li>
<li><a href="">Right Here</a></li>
<li><a href="">Somewhere Else</a></li>
</ul>
</li>
</ul>
</body>
</html>
https://www.servage.net/blog/2009/03/20/create-a-cool-css-based-drop-down-menu/
enjoy :-p

Recent Comments