Last active
September 3, 2022 07:57
-
-
Save cmaggiulli/763754bfc7734c3700cda2339ac24b32 to your computer and use it in GitHub Desktop.
Move file across branches, clobber destination, without merge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| source_branch=DA-1819 | |
| destination_branch=release-3.2.0 | |
| relative_file_path=structures/serializers/node.py | |
| git clone https://github.com/cmaggiulli/app.git -b $source_branch $source_branch | |
| cd $source_branch | |
| git checkout $destination_branch | |
| git checkout --patch $source_branch $relative_file_path | |
| git add $relative_file_path | |
| git commit -m "patching file" | |
| git push -o merge_request.create |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment