I'm new to Github and only push some commit to github. This is the first time I forked someone's repo. But after pushing some code on the forked one. I can't push my code on my own repo.
I have already try the git rebase
mentioned in this post. But all my code was deleted and covered by the files from the forked repo. I have recovered my files but still can't push on my repo.
The git status
shows like this
Your branch and 'origin/master' have diverged,
and have 7 and 61 different commits each, respectively.
the following are my procedures. Please tell me if I have any mistake and how should I push my codes to my own repo and forked one ? I don't want to merge them because they are totally different repository.
git clone
github-address from forked repositorygit push
origin master
[Edit] I have two repo on github. One is for my usage, the other one is the repo I forked. I change some code and push commit to the forked repo and then I can't push my code on another repo to github
I found something weird in git remote -v
, and click these two urls they are all connected to the forked repo.
origin https://github.com/xxxxxxxxx/VQA.git (fetch)
origin https://github.com/xxxxxxxxx/VQA.git (push)
these are what I haved tried. Information from git reflog
. I can't push commit after f66c72f
f66c72f (HEAD -> master) HEAD@{0}: reset: moving to f66c72f
f66c72f (HEAD -> master) HEAD@{1}: reset: moving to f66c72f
a4f1afd (origin/master) HEAD@{2}: reset: moving to origin/master
2697a7f HEAD@{3}: rebase: updating HEAD
2697a7f HEAD@{4}: rebase: aborting
f66c72f (HEAD -> master) HEAD@{5}: reset: moving to f66c72f
a4f1afd (origin/master) HEAD@{6}: rebase: checkout origin/master
2697a7f HEAD@{7}: commit: add resize_image.py
0d6e98a HEAD@{8}: reset: moving to HEAD^^
f66c72f (HEAD -> master) HEAD@{9}: reset: moving to f66c72f
f66c72f (HEAD -> master) HEAD@{10}: commit: add train.py file
a23ce98 HEAD@{11}: commit: add resize_images.py
0d6e98a HEAD@{12}: commit: add test.py file
5e09bad HEAD@{13}: commit: modify network architecture drop_out/activation
ad0525c HEAD@{14}: commit: rename
d3f0577 HEAD@{15}: commit: finishing data_loader
bbdbd9b HEAD@{16}: commit (initial): add make_vocab.py & preprocessing.py