-1

I had a issue with 7 commits ahead of main, 1 behind..., somehow fixed, partially. But I still get 1 commit ahead, 2 commits behind. Doing

git rebase master
git push --force-with-lease origin myfeature

on both branches and writes up-to-date. Everything is committed in feature branch. Anybody, would appreciate some help.

gitk --all screenshot

P.S. I know, i have to take a git course...

chicks
  • 2,393
  • 3
  • 24
  • 40
Dorin
  • 55
  • 7
  • Could you start up `gitk --all` and have a look at what it tells? Possibly attach a screen shot. – hlovdal Aug 13 '22 at 19:37
  • @hlovdal sure. but i did few more tries with pull and push and now it writes ` tango branch is 4 commits ahead of main. ` sec screenshot – Dorin Aug 13 '22 at 19:50
  • @hlovdal [screenshot of gitk --all](https://paste.pics/163d1b38a0666f7fb05cd4fbf14ca8a7) – Dorin Aug 13 '22 at 19:52
  • You need to embed the screenshot directly in the answer. Stackoverflow has its own associated image hosting service. Using other, external services are guarantied to lead to [link rot](https://en.wikipedia.org/wiki/Link_rot). – hlovdal Aug 13 '22 at 19:57
  • @hlovdal okay, i hope this works. ![screenshot](https://i.stack.imgur.com/CzwPj.png) – Dorin Aug 13 '22 at 20:03
  • The screen shot has two branches, `main` and `tango` while the question references `master` and `myfeature`. Was this the same repository? – hlovdal Aug 13 '22 at 20:11
  • @hlovdal Yes, the same repo. I just used some generic names. – Dorin Aug 13 '22 at 20:14
  • 2
    The "ahead/behind" message appears when you run `git status`, doesn't it ? Can you copy/paste the entire message on your question ? – LeGEC Aug 13 '22 at 22:35

1 Answers1

1

One blind bet : your local tango branch doesn't track the branch you expect. Run git branch --set-upstream origin/tango from your tango branch.

LeGEC
  • 46,477
  • 5
  • 57
  • 104
  • Running git status i got - nothing to commit on both repos. Ahead/behind was appearing on github website on tango. Anyways, somehow got my main branch up to date with latest changes. Best would be to take a course so i know the correct workflow. Still, thanks for trying to help. – Dorin Aug 14 '22 at 11:00
  • oh, then it's probably `tango` compared to `master` – LeGEC Aug 14 '22 at 23:08