Step 2. Create a Branch

Branchingis the way to work on different versions of a repository at one time.

By default your repository has one branch namedmasterwhich is considered to be the definitive branch. We use branches to experiment and make edits before committing them tomaster.

This diagram shows:

The master branch

A new branch called feature (because we’re doing ‘feature work’ on this branch)

The journey that feature takes before it’s merged into master

Have you ever saved different versions of a file? Something like:

story.txt

story-joe-edit.txt

story-joe-edit-reviewed.txt

Branches accomplish similar goals in GitHub repositories.

Here at GitHub, our developers, writers, and designers use branches for keeping bug fixes and feature work separate from ourmaster(production) branch. When a change is ready, they merge their branch into master.

Step:

1.Go to your new repositoryhello-world.

2.Click the drop down at the top of the file list that saysbranch: master.

3.Type a branch name,readme-edits, into the new branch text box.

4.Select the blueCreate branchbox or hit “Enter” on your keyboard.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容