git fetch --all
git checkout --track origin/users/branch_name
git reset --soft HEAD~1
git checkout master -- dirname
git stash
git checkout other-branch
git stash pop
git merge master
And resolve the conflicts one by one shown after above merging command.
git checkout master path/to/default.aspx.cs
So, just git checkout FROM_BRANCH_NAME path/to/file
git log
git log --oneline
git branch | Select-String -NotMatch -Pattern "master" | %{ git branch -D $_.ToString().Trim() }
SHA will be output of the first command
git rev-list -1 --before="2020-04-07 12:00" master git checkout SHA
git apply --reject --whitespace=fix "C:\Users\path\Downloads\Sample.diff"
In this example we are taking changes from twitter_integration to master branch
$ git branch
* master
twitter_integration
$ git checkout twitter_integration app/models/avatar.rb db/migrate/20090223104419_create_avatars.rb test/unit/models/avatar_test.rb test/functional/models/avatar_test.rb
https://jasonrudolph.com/blog/2009/02/25/git-tip-how-to-merge-specific-files-from-another-branch/