Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #268229

Committing git working tree with other git repos

From Paul M Foster <paulf@quillandmouse.com>
Newsgroups linux.debian.user
Subject Committing git working tree with other git repos
Date 2024-03-13 16:10 +0100
Message-ID <Ihypl-gorE-117@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Folks:

I have a /home/paulf/stow directory with contains subdirectories for each
of the packages whose dotfiles I want to manage, like:

/home/paulf/stow/alacritty

In each subdirectory, I have all the config files for that packages, under
git management. This means that the directory will look like this:

/home/paulf/stow/alacritty/.git
/home/paulf/stow/alacritty/.config/alacritty/alacritty.yml

This works well with stow (configs are now symlinks in $HOME).

I'd like to copy all of this to a git repo on gitlab. You would think you
could go to the ~/stow directory, "git init", then "git add" each
directory, and all is good. However, git looks inside the directories and
sees there are already .git directories there, and refuses to add the
directories and their contents to its repo. Instead, it wants you to use
"submodules", to wit:

git submodule add ./alacritty

This adds an *empty* alacritty subdirectory to the git repo, which isn't
useful.

I need a way to bring all these subdirectories and their contents under a
git repo so I can send it to gitlab. Any suggestions?

Paul

-- 
Paul M. Foster
Personal Blog: http://noferblatz.com
Company Site: http://quillandmouse.com
Software Projects: https://gitlab.com/paulmfoster

Back to linux.debian.user | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Committing git working tree with other git repos Paul M Foster <paulf@quillandmouse.com> - 2024-03-13 16:10 +0100
  Re: Committing git working tree with other git repos john doe <johndoe65534@mail.com> - 2024-03-13 19:40 +0100
    Re: Committing git working tree with other git repos Paul M Foster <paulf@quillandmouse.com> - 2024-03-13 20:30 +0100
  Re: Committing git working tree with other git repos Tim Woodall <debianuser@woodall.me.uk> - 2024-03-13 22:50 +0100
    Re: Committing git working tree with other git repos Tim Woodall <debianuser@woodall.me.uk> - 2024-03-13 23:00 +0100
      Re: Committing git working tree with other git repos Tim Woodall <debianuser@woodall.me.uk> - 2024-03-14 20:50 +0100

csiph-web