How can I tell which remote “parent” branch my branch is based on?

后端 未结 4 1839
温柔的废话
温柔的废话 2021-01-30 10:47

I have a scenario in which there a several remote tracking branches within my local repository that I must sync up to. Our workflow model is:

  • make a branch locally
4条回答
  •  甜味超标
    2021-01-30 11:29

    there are multiple ways to check that. i have endup with Free way to get this result.

    1. use gitkraken(paid for private repository!), it provide you wonderfull way to see Tree of your branchs and commits. by scolling down you will reach root of your parent branch.

    2. if you use bitbucket, then they provide view in web to see all your commits for all branchs(By selecting all branch from dropdown).

    3. Free way, via git commnad.

      git log  --graph --decorate --oneline --all
      

      Commnad Expaination

      git log view log.

      --graph view log as graph.

      --decorate view log in colorfull mode.

      --oneline view log, row only one line not full detail in commits.

      --all view log, all branchs. (important to solve this thread)

提交回复
热议问题