Skip to content

Get a branch by using a commit #1401

Description

@CristianCojocari

The code in question is here:

repository = repo.Repo(https://....)
repo.git.checkout('dev')
specifiedCommit = repo.commit('ACommitFromMasterBranch')

Is there a way to either check whether specifiedCommit is a commit in the dev branch, or restrict somehow the commits that can be accessed to the active branch?

Currently the code above outputs the actual commit from the master branch and I couldn't find any way to access it's branch to check whether it's dev or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions