I am currently having an issue with a branch which had files that were listed as untracked in git.
This branch was sent for review and it came back with saying that the files that were moved were deleted. I checked it and the files were listed as untracked even though when I changed to the branch on my local pc I could navigate to these files. Maybe it's still in my cache, I don't know.
The reviewer made some changes then pushed to my branch and passed it back to me. I then did a git add "filename" for the untracked files. I then committed them, did a push and it said I need to do a pull. So I proceeded and did the pull and it brought up another message "There is no tracking information for the current branch. Please specify which branch you want to merge with".
I did git branch --set-upstream-to origin UXUI-805 and then it said "Branch UXUI-805 set up to track remote branch master from origin". Should'nt it be set up to track the current branch that I am on instead? because initially I need to push to work to the same branch but the one that is the remote branch on the repo.
Furthermore, I did a git branch to check which branch I was on and I was still on the same branch "UXUI-805"
Went ahead with git pull => and it said the branch was up to date then tried to do a pit push to origin UXUI-805. It rejected the push and I got this message
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
I tried git status and it said
On branch UXUI-805
Your branch is ahead of 'origin/master' by 32 commits.
(use "git push" to publish your local commits)
nothing to commit, working directory clean
Tried a git stash but that said there is no work to save. This is because I've already committed the work
I don't know how to fix this. Please help. Thanks