Overwrite single file in my current branch with the same file in the master branch?

Say I have two branches – master and redesign. How would I go about overwriting the file default.aspx.cs in my redesign branch with the one from master?

I found this question but it seems to go over how to revert a file back to it’s previous version in the same branch. I also considered using a merge, but I don’t want to merge, I want to overwrite. Suggestions?

  • Git: overwriting code of one branch to another
  • Git command could not be found. Please create an alias or add it to your PATH
  • Multiple git repositories in a path
  • Android Goldfish branches
  • TortoiseGit show log for remote branch
  • Cannot pull with rebase
  • Regexp search as case insensitive in gitk
  • Should composer.lock be committed to version control?
  • C# Compute GIT Commit Hash
  • ‘fatal: No destination configured to push to’ error when I do a 'git push'
  • Can you reference the environment in $HOME/.gitconfig
  • Git: set the tip of a branch to a particular commit
  • One Solution collect form web for “Overwrite single file in my current branch with the same file in the master branch?”

    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

    Git Baby is a git and github fan, let's start git clone.