Git Remote with Git Bash Windows Command Line
Putting your existing work on GitHub can let you share and collaborate in lots of great ways.
- Create a new repository on GitHub. To avoid errors, do not initialize the new repository with README, license, or
gitignore
files. You can add these files after your project has been pushed to GitHub.
- Open Git Bash on Computer.
- Change the current working directory to your local project.
- Initialize the local directory as a Git repository.
- Add the files in your new local repository. This stages them for the first commit.
- Commit the files that you've staged in your local repository.
- At the top of your GitHub repository's Quick Setup page, click to copy the remote repository URL.
- In the Command prompt, add the URL for the remote repository where your local repository will be pushed.
https://bit.ly/2Z0KWWw
Quick Overview:
Set Url:
git remote set_url [origin]
git remote -v
git push -v [origin]
Remove Url:
git remote
git remote rm [origin]
git remote -v