0

On legacy project with 2 environments prod and dev.
We recently added git on prod and pushed all the changes in the master branch, and can now support this server better.

However I have trouble initiating the git tracking on our dev server, there code base there is a bit different and I can not just clone it fresh...

What are the proper steps to add git repository tracking, to existing code, similar to the master branch ?

I tried:

git init
git origin add remote ...
git branch --set-upstream master origin/master

But now all my local files are shown as locally deleted.

git checkout master shows conflict on all files
git pull says all is up to date

1
  • What are you trying to do? using one repo and add the second one to it? Commented Jan 29, 2016 at 14:13

1 Answer 1

1
  1. Clone your new repo to a stand-alone server
  2. In cloned repo create a new branch develop
  3. Rsync your codebase from your dev server into this repo
  4. Commit 'develop' branch and push to remote.
  5. Setup your dev server to track develop branch
  6. Merge develop branch into master. This will be a new prod codebase.

Disclamer. This is not an endorsement of a proper release process, just the answer to OP problem

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.