0

I am working on Master branch, another team member is also working on that branch. I have made some changes on local but my team mate also made some changes and committed them in Master. Now, Git is not allowing me to pull those changes saying i have to stash my local changes first. Now I have a question;

If I stash my changes and pull the changes made by other team member and then apply my stash, will it overwrite the pulled changes?

What should I do to push my changes without making any blunder in master?

Just_another_developer
  • 5,737
  • 12
  • 50
  • 83

1 Answers1

0

If I stash my changes and pull the changes made by other team member and then apply my stash, will it overwrite the pulled changes?

No, you can pull their changes to your local, then apply your stash back on top.

What should I do to push my changes without making any blunder in master?

If conflicts arise when you do stash apply (which may not be the case, depending on the changes), it's not an error, it's git giving you the opportunity to specifically choose how you want to go forward. Resolve them and commit. Unless someone else has commited to master in the meantime already (in which case you just have to repeat the pulling process), you'll be all good to push on master.

Romain Valeri
  • 19,645
  • 3
  • 36
  • 61