f (-f) -f (-f) -f (-f) -f (-f) -f (-f Resolve possible errors:Įrror: Failed to push some refs to Causes of the problem: Remote library is inconsistent with local library, so the remote library to the local library can be synchronized, that is, run git pull -rebase origin masteCommand, push again (execute just git push origin -u -f origin masterCommand). In the meantime, this upStream should only be created when the code is first pushed and will not be created in the future "-u" means to create upStream and push code to Github. Push local repository to remote repository (synchronize code to remote repository) : git push -u -f origin master.Pull remote primary branch information and synchronize to local: git pull.Associate a local repository with a remote repository (connect to a remote repository) : git remote add origin XXX.To commit a staging file to a local repository: Git commit -m.Add all files (modified files, new files, etc.) to the staging area: git add.Initialize the local repository: git init.Need to input the cmdCommands and explanations: ![]() ![]() The daily-demo here is my local project (existing code) In the root directory of the local project, open the CMD program and enter CMD. If you do not use the warehouse, you can settingsTo delete it.Ĭommit existing projects (local project code) to git repository.The new warehouse, originally there was only one README.mdfile The login github, click your profile picture to pop up, click" Your respositories"That is, your repository.Make sure you have one first githubAccount number, if not, you can register first.Git push -u -f origin master -f () -f () -f () -f () -f () -f () Copy the code Create a repository on Github Pull remote primary branch information, first pull merge information ![]() Git remote add origin XXX Git branch = git remote rm origin git branch = git remote rm origin Submit the information to the local repository Github Commit local project code to the Github repository for the first time One, the required command git init // 1.
0 Comments
Leave a Reply. |