Skip to content

Instantly share code, notes, and snippets.

@Bharathkumarraju
Last active September 3, 2020 13:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Bharathkumarraju/8587739d5e85c16eea686f291c2064b3 to your computer and use it in GitHub Desktop.
Save Bharathkumarraju/8587739d5e85c16eea686f291c2064b3 to your computer and use it in GitHub Desktop.
From local machine
Step1: If you are in feature branch ...checkout to master first and pull lastest master code to local
bharathkumarraju@R77-NB193% git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
bharathkumarraju@R77-NB193 % git pull
remote: Counting objects: 24, done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 24 (delta 19), reused 0 (delta 0)
Unpacking objects: 100% (24/24), 2.27 KiB | 86.00 KiB/s, done.
From bitbucket.org:test/test-project
a334cb4..b4d046c master -> origin/master
Updating a334cb4..b4d046c
Fast-forward
env.auto.tfvars.j2 | 3 ++-
test/fixtures/datadog/values.yaml | 3 ++-
test/fixtures/gke/values.yaml | 3 ++-
3 files changed, 20 insertions(+), 10 deletions(-)
bharathkumarraju@R77-NB193%
Step2: Now checkout to your feature branch like below.
bharathkumarraju@R77-NB193% git checkout feature/123
Switched to branch 'feature/123'
bharathkumarraju@R77-NB193%
Step3: Now please use -i option interactively pick or squash unnecessary commit messages
bharathkumarraju@R77-NB193% git rebase -i master
Successfully rebased and updated refs/heads/feature/123.
bharathkumarraju@R77-NB193 %
Step4: Now use -f option to push to feature branch like below.
bharathkumarraju@R77-NB193% git push origin feature/123 -f
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 714 bytes | 714.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0), pack-reused 0
remote:
remote: View pull request for feature/GCD-215 => master:
remote: https://bitbucket.org:test/test-project/pull-requests/38?t=1
remote:
To bitbucket.org:test/test-project.git
+ c63405d...ba1780e feature/123 -> feature/123 (forced update)
bharathkumarraju@R77-NB193%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment