문제

Whats the best practice to restrict master branch or ensuring that your existing code is safe? I'm going to hire someone to work on my existing code, how do I ensure that they won't mess up the code I have? I've created a branch off of the master, but thats about it. Not sure if this is the correct way?

Please advise,

Thanks

도움이 되었습니까?

해결책

On GitHub, every user has his own repository. Nobody needs write permission to anything else except his own repositories. Let your new hires work on their own repositories. Don't give them write permission to yours. When they have something to show you, they can create a Pull Request. You can review their work, and suggest improvements. After you're really satisfied, accept the pull request, merging it into your repository.

This working style is very natural with Git or any distributed VCS. Instead of having an authorization system with permissions, you have just one rule: can only edit your own. You can choose what contributions you take and what you reject. Add to this that GitHub has tons of features to make code reviews easy. In particular, you can comment any line in a diff to guide the new hire what exactly he needs to improve.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top