xxxxxxxxxx
import git
repository_path = '/path/to/repository' # Replace with the actual path to your Git repository
repo = git.Repo(repository_path)
branches = [str(branch) for branch in repo.branches]
print(branches)
xxxxxxxxxx
git branch -a # for seeing all local branchs
git branch -r # for seeing all remote branchs
git show-branch # for seeing the last commit && commit msg within which branch
xxxxxxxxxx
git branch -r
# origin/main
# origin/feature1
# origin/debug2
# remote-repo/main
# remote-repo/other-feature
xxxxxxxxxx
$ git branch -a. If you require only listing the remote branches from Git Bash then use this command:
$ git branch -r. You may also use the show-branch command for seeing the branches and their commits as follows:
$ git show-branch.
xxxxxxxxxx
for i in $(git branch -r | grep -vE "HEAD|master"); do git branch --track ${i#*/} $i; done
xxxxxxxxxx
git checkout --detach
git fetch origin '+refs/heads/*:refs/heads/*'
xxxxxxxxxx
---
import MyImage from "../assets/myImage.jpg"
---
<img src={MyImage.src} />