I'm testing Git GUI software (windows version). I cloned a remote repository and now, I only have master branch selectable on my local repo using Git GUI.
In the remote repo there is a "dev" branch too, but it is not selectable locally. Is this a bug or is the normal behaviour? I'm searching for the best way to get access to "dev" branch locally.
Thank you
If you have a single remote repository, then you can omit all arguments. just need to run git fetch , which will retrieve all branches and updates, and after that, run git checkout <branch> which will create a local copy of the branch because all branches are already loaded in your system.
While on a branch, clicking “Download Zip” from the Code dropdown will lead you to a download for the specific branch you're on. It doesn't tell you this on the site though, so you'll have to make sure that the filename for the download URL matches the correct branch, named in reponame-branchname. zip format.
The idea is to use the git-clone to clone the repository. This will automatically fetch all the branches and tags in the cloned repository. To check out the specific branch, you can use the git-checkout command to create a local tracking branch.
Steps as below: Git GUI -> branch Tab -> checkout -> Tracking branch -> select origin/dev -> checkout -> branch Tab -> create -> name for dev and select this detached checkout -> create. Now you have a local dev branch the same as remote. You can check the history by repository Tab -> visualize dev's history.
You should checkout to origin/dev and then create a local branch dev. Steps as below:
Git GUI -> branch Tab -> checkout -> Tracking branch -> select origin/dev -> checkout -> branch Tab -> create -> name for dev and select this detached checkout -> create.
Now you have a local dev branch the same as remote. You can check the history by repository Tab -> visualize dev's history.
You can also commit changes for dev branch and push to remote dev branch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With