Ted Laskaris
Ted Laskaris

Reputation: 11

How to change the path in terminal shell for github repository?

I am a first time learner and can't push up to GitHub.

The path is incorrect: It is: https://github/com/TedLaskaris/test-repo.git/
How do I change it to: https://github.com/TedLaskaris/test-repo.git/

I don't know how the "/" got there.
And I don't know how to change it to a "."

Upvotes: 1

Views: 1104

Answers (1)

VonC
VonC

Reputation: 1323263

You can change it with git remote set-url:

git remote set-url origin https://[email protected]/TedLaskaris/test-repo

(I prefer adding the TedLaskaris@ part, to avoid having to enter the username when pushing)

For the second error message (Updates were rejected because the tip of your current branch is behind), I would recommend a git pull --rebase, in order to rebase your local commit on top of the updated upstream/master.
See for example "Failed to push some refs when pushing feature branch".
(since you are the only one pushing to your GitHub repo for now, rebasing is ok)

https://www.atlassian.com/pt/git/workflows/pageSections/00/contentFullWidth/0/tabs/00/pageSections/05/contentFullWidth/00/content_files/file1/document/git-workflow-svn-6.png

See the section "Mary tries to publish her feature" of the Atlassian article "Centralized Workflow".

Upvotes: 1

Related Questions