Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

Can I change the default branch that shows when I visit a github.com repository I don't own?

$
0
0

I'll use this repository as an example: https://github.com/microsoft/WSL

When I visit that URL, the repository's default branch is shown:

enter image description here

Is there a way to change this so that when I visit that URL, it shows me a different branch of my choosing? For example, https://github.com/microsoft/WSL shows this instead:

enter image description here

I know how to write a user script that would redirect from https://github.com/microsoft/WSL to https://github.com/microsoft/WSL/tree/vhd-logs but I want to know if github.com has this functionality.

I also think I could fork this repo and change the default branch in my fork, but I'd like to avoid that.


Here's why want this functionality: one of the repos I frequent has a default branch and a branch meant for nightly/nightlies (sp?). When communicating with others, I often want to refer to a line of code in the nightly branch. It usually goes like this:

  1. Open a new tab
  2. Type in a portion of the repository name
  3. Once it shows up in my history, visit that url
  4. Change the branch I'm viewing <-- I keep forgetting this step!
  5. Copy a link to the file/line I want to refer to in my discussion with others.

I forget step four so often, I just want to default the branch that comes up when I view this repository.

Now, if github doesn't have this feature, suggestions on a better workflow would be appreciated. Thanks


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>