I have a project with several friends in GitLab, and, of course, the main branch, and there are others. When I cloned the repository, I also created an upstream with the git remote add upstream ...
command.
Then I released git fetch upstream
. This is followed by git checkout upstream/test1
. Now, if I type git branch -a
, I get this output:
* (HEAD detached at upstream/test1) master remotes/origin/HEAD -> origin/master remotes/origin/master remotes/upstream/test1 remotes/upstream/master
Everything is fine, but then I made some changes to the code in my upstream/test1
branch, and I want them to insert them into the origin/test1
repository, I get an error message in the header. Please note that I am doing the following steps:
git add . git commit -m "Sample message" git push -u origin test1
If I issue git show-ref
, I get the following output:
refs/heads/master refs/remotes/origin/HEAD refs/remotes/origin/master refs/remotes/upstream/test1 refs/remotes/upstream/master
I checked the following questions , but did not find it useful. Any ideas how to solve it?
typos source share