From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: PANEL Christian <ch.panel@free.fr>
Cc: git@vger.kernel.org
Subject: Re: git ability
Date: Sat, 13 Feb 2021 17:25:46 +0000 [thread overview]
Message-ID: <YCgLmgrKCV9AIzMI@camp.crustytoothpaste.net> (raw)
In-Reply-To: <24e39c2c4b7b86aa4a671601a069eaee767a63fb.camel@free.fr>
[-- Attachment #1: Type: text/plain, Size: 2633 bytes --]
On 2021-02-13 at 13:25:03, PANEL Christian wrote:
> hello,
>
> does git have the ability to handle a repository on a removable disk?
Yes, this is possible. You should access it from only one operating
system at a time.
I also strongly recommend that if you're going to do this across
operating systems, you use UDF[0] and not NTFS, FAT, or exFAT for this
purpose. Linux can format drives this way for use across OSes.
> here is the experience I had:
>
> I have a project that I manage on a removable disk (therefore with a
> ".git" directory on it).
>
> until now I did "commits" and "push" on the server from windows10.
>
> I made changes to the source and made a "commit" from linux (on the
> same computer). Git asked me again for my username (email and user
> name): I then thought that these were not stored in the ".git"
> directory
These settings, user.name and user.email, _can_ be stored in
.git/config, but _usually_ are stored in the user's home directory,
which will differ between operating systems. You can use the "git
config" tool to set them appropriately if you'd like. I personally sync
my dotfiles across machines, which includes .gitconfig, which is an
approach many others use as well.
> I then saw a new branch called "linuxcompatibility" appear.
>
> I would like to understand.
Git doesn't create branches unless requested. It's possible that some
other tool on your system did. For example, if you're using a file
syncing service (e.g., Dropbox or OneDrive) to sync data, that's
definitely not recommended and can cause problems like this. If you're
using WSL instead of a true Linux system, that data could also have been
created by Windows.
It's also possible that this branch already existed on the server and it
may have shown up as a remote tracking branch with "git branch -a", in
which case attempting to check it out may have created a local copy.
Without more details or output from a program, it's hard to say what's
going on here.
> I thought to myself that I would then merge the "linuxcompatibility"
> branch to the "master" branch and push it all back to the server.
>
> if that went well with me, on the server the branch
> "linuxcompatibility" remained.
If you want to delete a branch on the remote server, you can do this:
git push -d origin linuxcompatibility
If you want to delete a branch locally, you can do this:
git branch -d linuxcompatibility
[0] https://en.wikipedia.org/wiki/Universal_Disk_Format; v2.01 is
recommended.
--
brian m. carlson (he/him or they/them)
Houston, Texas, US
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]
prev parent reply other threads:[~2021-02-13 17:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-13 13:25 git ability PANEL Christian
2021-02-13 17:25 ` brian m. carlson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YCgLmgrKCV9AIzMI@camp.crustytoothpaste.net \
--to=sandals@crustytoothpaste.net \
--cc=ch.panel@free.fr \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).