GitHub Learning notes-occasional updates

Source: Internet
Author: User

Recently engaged in an outsourcing project, there is a very strong brother took me, he wrote back end, I am responsible for the front-end part, project cooperation needs to use GitHub, which is also the morning and evening to contact, recording the project process in the Github/git use of learning notes.

1. After reading some tutorials on the web, I created a repository on my GitHub and then tried to create a branch, push, and feel as if it was possible to set up a branch on the project and push, because the first use was not very clear, accidentally push to the main branch, The creation branch that I see online is git branch branch_name then switch to branch git checkout branch_name, maybe I push it directly to git push repo_url branch_name, so it leads directly to push Go up to the main branch.

Since this time using Github Workflow,github Workflow is actually equivalent to feature Branch Workflow, instead of the general project use of FORK-PR, that is, we are in the same warehouse development, and then open the feature branch, development, submission , and then pushed to the remote repository, so I should push my branch, and in fact I do not have git branch branch_name This command, I just need git checkout-b my_branch this command, You can create new and switch to a new branch.

2. A commit must be written before push can be push

3. If you want to modify a file name, you should first git rm old_doc and then git add new_doc

GitHub Learning notes-occasional updates

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.