Skip Navigation

User banner
Git

Members
0
Posts
50
Created
3 yr. ago

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Resources

Rules

  1. Follow programming.dev rules
  2. Be excellent to each other, no hostility towards users for any reason
  3. No spam of tools/companies/advertisements. It’s OK to post your own stuff part of the time, but the primary use of the community should not be self-promotion.

Git Logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License.

🌉 bridged from !git@programming.dev by Tidepool

Flow suggestions for pushing to remote--sometimes?

Probably silly. Say I've got a remote repo that is only available sometimes, like a removable drive, and I want to add it as a remote, but I don't want to get an error each-- Actually, maybe disregard... I was just poking about in the CLI and remembered that ofc I could add a named remote without adding its pushurl to my main remote like "origin". So it's actually easiest to just do like

 bash
# Add the remote
git clone --bare . /mnt/asdf/asdf
git remote add usb /mnt/asdf/asdf

# Push to it by name whenever
git push usb

Seems intuitive to me, but maybe I'm X/Ying it... how would other people go about having a "sometimes" available remote repo, where you want to track easily and efficiently keep track of all the git history?