How can I update the main branch with my branch's changes? Switch to the main branch using the git checkout command, then merge the branch using the git merge command along with the branch name.
git checkout master path/to/default.aspx.cs
Before doing this, you probably have to : git checkout redesign
So, just git checkout FROM_BRANCH_NAME path/to/file
To overwrite a file in a branch from another branch, i.e, master
to redesign
do (when redesign
is the current branch)
git checkout master ./path_to_file/default.aspx.cs
git checkout branch_name ./path_to_file/file_name.[file_extension]
To know more about the command checkout git checkout documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With