Git. Rebase local branch atop local master. How do I ignore a single files changes?

With Git I am on a branch. I am rebasing the branch atop master. There is a conflict that I want to resolve by ignoring the branches version and accepting master's version. How do I indicate I want to use master's version of the file during the rebase-ing.

Thanks, Doug


git checkout --ours <path-to-file> is the command you are looking for.

It will checkout the master version of the file which you then can add to the index (to mark the conflict resolved) and continue your rebase.

You can take a look at the checkout documentation for more information.

See the comment under --merge as to why you need to use --ours and not --theirs.

Need Your Help

CSRF Middleware causing trouble Node.JS + Express

node.js express csrf middleware

Have successfully gotten the csrf middleware working in express as per previous SO questions. It's generating the tokens fine however it is denying ALL form submissions.

How to do something before on submit?

javascript jquery html

i have a form which has a button that submits the form. I need to do something before submits happen. I tried doing onClick on that button but it happens after the submit.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.