0

I use git for a website. So at first I started with master, created develop and worked in it. The website is finished by now. I merged develop into master and tagged it with v1.0.

What about the 'develop'-branch? Do I work just as usual, or should i delete develop, clone it from master and start with a fresh develop-branch?

And, if I work as usual and merge later, like for a release-1.1, does git merge old commits again? It shouldn't, because of the same SHA-keys...?

4

3 回答 3

1

You should just keep working in develop. Deleting and re-branching from master won't solve anything for you - you'll get the same thing you did when you merged into master.

The exception to this would be if you other branches that you were merging to master (bug fixes, feature dev, etc). In this case, you would either need to pull again from master, or (preferably) merge other branches into develop and use it as a catch-all for anything going to master.

In an exclusively 2-branch setup, just keep working in your develop branch :)

于 2013-10-29T10:56:40.747 回答
0

I'm working with a git remote repository and two local repositories: localhost for development and VPS for production.

I think the best way is what you say: remove your develop repository and clone from the remote one. On the other hand, you can use .gitignore files to avoid changing files that you don't want to change.

When you have all done, you can develop in your local repository, then, after commit, you can push the changes:

git push -u original

Now, you can get into your server via ssh and:

 cd /var/www/yoursite
 git pull

And that's all. You have your changes in all your repos.

于 2013-10-29T10:57:08.487 回答
0

After merge develop and master point at the same commit. There is no need to delete and rebranch.

于 2013-10-29T14:53:35.327 回答