![]() To verify that the existing project was pushed to GitHub successfully, log into the GitHub website and browse the repository. The -u switch makes the remote GitHub repo the default for your existing project. The -f switch forces Git to overwrite any files that already exist on GitHub with your existing project’s files. Note that older Git repositories create a master branch by default, while newer ones use main. Simply issue a git push command with the name of the current branch along with the -u and -f switches. With the remote reference added, you are ready to push your existing project to GitHub. ![]() git remote add origin cameronmcnz/example-website.git Push the first commit to GitHub To allow your existing project to synchronize with GitHub, issue a git remote add command to configure a reference from you local Git installation to the repository on GitHub. Note that the last segment of the git remote add command is your project’s GitHub URL. git commit -m "Add existing project files prior to the push to GitHub." Add a remote reference for GitHub
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |