Skip to content
Advertisement

Linux to Windows repository pull and push

Our entire code base at work is housed on an IIS Windows environment. My task was to copy the code to our new Linux Ubuntu server and go through the code to make the changes necessary to get it to run on the Linux box. It took a couple months but it works. In the meantime, code updates were made on the productions Windows server to the code base by another developer. Now I have the task of pushing the changes to the Linux box so we can pull the trigger and run it live in the new environment.

PROBLEM:

When I performed a git push origin master I was thrown an error stating that I must perform a pull first. Upon diverging and running a git status it says I have `11 and 3 commits each, respectively. The problem is over the course of 2 months I can’t remember all the changes made and something could come crashing down in the Windows environment and that can’t happen even for a short time. I just need some advice.

I was wondering if it’s possible to create a clone of origin master then push the changes to my local from the prod, merge the files and then upload to the Linux box since I can’t push to the Linux now because of the needed pull.

Advertisement

Answer

When you do git pull, the changes in the remote origin branch are merged into your local origin branch. That is your “local clone of origin/master,” so to speak. Inspect the state of your own master branch, and if everything looks right, then push your changes.

Run gitk --all before and after the pull, and you will see that the merge took place, but only on your system.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement