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