git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Usability outrage as far as I am concerned

From
Jacob Keller <jacob.keller@gmail.com>
Date
Dec 22, 2017, 23:05 UTC
Message-ID
<CA+P7+xpt1cW-uokayYFJ5cr88FKBcn_RT3v7iLHyu7kZaS=wbg@mail.gmail.com>
In-Reply-To
<CAEW+b66pCqTBz6o_aTK0byyKsDc8HRfHuqKf64Ob6pBtL9w2Lw@mail.gmail.com>
On Fri, Dec 22, 2017 at 7:57 AM, Cristian Achim <brancoliticus@gmail.com> wrote:
Show 11 quoted lines
>> Can you show the output of "git remote"
>
> # in usb_subfolder
> $git remote
> origin
> $
>
> #in home_subfolder
> $git remote
> $
>

With the -v switch you can see where each remote points to (tho your home local repo has no remote which is fine).

Show 20 quoted lines
>> and also
>> clearly explain with details the layout of what the folders are and
>> what is or is not a repository?
>
> Take the following update into consideration and then reread my first
> email hopefully with improved clarity:
>
> 'home_subfolder' is the path on disk inside my user account home
> folder in the 'home' root folder to the initial repo from which I
> meant to do a backup.
>
> 'usb_subfolder' is the path on disk in the 'media' root folder to the
> initial empty folder into which I wanted to do the backup above that
> points into a usb stick I mounted in the default Kubuntu KDE file
> manager way of mounting usb stick folder hierarchies.
>
> Current situation is that 'git log' in both home_subfolder and
> usb_subfolder show the same hash with only one branch in both. From
> usb_subfolder 'git pull home_subfolder' is broken as in the original
> message.

Ok. So you have a repository inside your home directory which you wish to copy into the USB stick?

So what steps did you take to setup the repository usb_subfolder initially?

You're basically trying to create a backup copy of what's in home_subfolder into your USB stick?

If you're confident that home_subfolder is accurate right now, (ie: you inspect its contents with git log, git status, and regaulr commands to check that everything is as you expect), here's what I would do:

cd to your usb stick, then run git clone /path/to/home_subfolder

this will create an initial clone.

If you wish to update it later, you can mount hte usb stick, and then just run git pull from inside the new subfolder. Note that you do *not* run "git pull home_subfolder", as git pull expects the name of a remote, which in this case is just origin (since the default remote name you clone from is origin)

I'm still not certain what state you got in, but I believe based on your commands that the home_subfolder is fine, and you somehow incorrectly setup the usb_subfolder.

Thanks, Jake

PS/Tangent:

If you never need the checked out files on the USB disk, and only wish to keep history saved, then you can actually do "git clone --mirror <path>" in order to make a bare copy which is a complete mirror of all refs in the original repository.

Then you can update it with just git fetch, or git remote update. (tho, keep in mind this clone would not have any working tree, but merely a bare repository contents). (You can, ofcourse, recover the files by simply cloning to somewhere else, or adding a new work tree or similar.

Previous: Cristian AchimNext: Anatolii Borodin
Message 5 of 7 in “Usability outrage as far as I am concerned”
  1. Cristian AchimDec 20, 2017
  2. Ævar Arnfjörð BjarmasonDec 20, 2017
  3. Jacob KellerDec 21, 2017
  4. Cristian AchimDec 22, 2017
  5. Jacob KellerDec 22, 2017
  6. Anatolii BorodinDec 23, 2017
  7. Cristian AchimDec 23, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.