0

What I do is:

  1. git branch sth
  2. git checkout sth
  3. (Twice):
    • git add -A
    • git commit -m ""
  4. git checkout master
  5. git merge sth
  6. git branch -d sth

But I must be doing something wrong because I only get a vertical line graph of commits for my local repository without any commits going to a branch. Any tips how to solve my problem?

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
togK
  • 11
  • 3
  • Q: Is this what you're trying to do? https://stackoverflow.com/a/1838881/421195 – paulsm4 Jul 02 '21 at 22:07
  • 3
    What you're looking for is certainly `git merge --no-ff sth` (at your step 5). See [this answer](https://stackoverflow.com/a/14865661/9164010) for details. – ErikMD Jul 02 '21 at 22:11
  • 1
    _Is_ that a problem? If your branches apply cleanly, why _not_ fast-forward? – jonrsharpe Jul 02 '21 at 22:14
  • 1
    In other words, you "only get a vertical line graph" because you don't have any diverging points in your graph, though you can force it with `--no-ff`. – Inigo Jul 02 '21 at 23:34

0 Answers0