Reputation: 433
I was pushing normally to my repository, but I had to delete that one due to mistakes I made.
Afterwards, I made a new repository and connected it, but when I try to push my whole code to that repository, it does not get pushed since I have no changes.
On branch final-branch
nothing to commit, working tree clean
If I type git add --all
and push it all to a new branch, only .txt
files get pushed, nothing else.
How can I push my whole code to a new repo ?
Upvotes: 1
Views: 59
Reputation: 2654
You need to add a new remote:
git remote add new-remote https://github.com/user/repo.git
To check if the add work fine:
git remote -v
You should see something like:
new-remote https://github.com/user/repo.git (fetch)
new-remote https://github.com/user/repo.git (push)
A then you can push to your new remote:
git push new-remote master
Upvotes: 1