#[SOLVED] How do I make or sync backups of .zshrc and important files from my arch to github

292 messages · Page 1 of 1 (latest)

silk star
#

I already have a .tar.gz of my config and important stuff in a usb. but I would love it if I can also have double or triple backup with github just in case

ripe garden
#

@silk star first make a folder called whatever you want

#

mkdir foo

#

git init

silk star
#

next?

ripe garden
#

make a folder called .config

#

put your .config folders/files into there

silk star
#

5.5Mb a lot of config files hehehe... so I cd and git init

ripe garden
#

@silk star hold on

#

did you put all of it?

silk star
#

Initialized empty Git repository in /home/dex/Backup/.config/.git/

┌──(dex㉿archlinux1)-[~/Backup/.config]
└─$

ripe garden
#

or just some?

silk star
#

just some

#

my .config is very large ... it has cash ... it's like 2gb or something ... in there it's just some stuff (nvim, zshrc...ect)

ripe garden
#

anything else you want to put?

silk star
#

no

#

so what's next... I don't know how to sync this to my github account

ripe garden
#

hold on

#

get a list of packages you use

#

and call it packages.txt

silk star
#

already there

ripe garden
#

@silk star .zshrc does not belong in .config

#

it belongs one folder above

silk star
ripe garden
#

as in .config .zshrc

#

instead of .config/.zshrc

silk star
ripe garden
#

yazi > nnn

#

Labwc > openbox

#

or waybox

silk star
#

I'm exploring ok ? I know I have a lot of clutter but here I have 5mb folder ... teach me how to sync to github ? i did git init

ripe garden
ripe garden
#

as in ./install.sh

novel shore
#

there might be some fancy pants git way to do this, but honestly I would set up a cronjob to commit and push every other day or something

ripe garden
#

@silk star make the repo in git first

silk star
#

I mean I have all the packages and AUR pckage names in the .txt so I mean if I want to I can just make a script real quick that goes over them... for now let's just focus on 1 thing and sync my most important configurations to github

I just want to sync this 5mb this is basically everything I've done so far for the last 1 month (ofc I have done some stuff in root but that's not important and can be replicated real quick with a script or something... but my home is gg if I lose those)

ripe garden
#

then git add .

silk star
ripe garden
#

then git push

silk star
novel shore
ripe garden
ripe garden
silk star
novel shore
#

Important distinction is that git =/= github. Github is a hub for gits

#

git init creates the git repo, and then after that it's basically just scp with a cool hat on

silk star
novel shore
#

Notice that the syntax of git fetch commands is the same as scp or rsync? When you git fetch [email protected]:username/repo you're logging in as the git user on the github.com website, and copying the files found on username/repo

silk star
novel shore
#

It's magic!

#

All that said though github is easiest lol, especially if you have an account already

silk star
#

alright so how can I push this folder to github to this arch_dex repo

#

sry I lost the steps... (I really need to learn git )

novel shore
# silk star

here you would git clone <that url in the blue box>

#

git clone, sorry

#

That will clone your empty repo to your computer

silk star
#

yeah I've used git clone a lot to install AUR packages

#

so how do I do the inverse

novel shore
#

then you go in there and make changes, git commit -a -m "this is my commit message!" and then git push and your changes will go to your github repo

#

Noting stuff like git add to add the files you want to push

silk star
#

but how does it know the right repo

novel shore
#

That's set when you clone it

#

you can see with git remote -v

#

and set it elsewhere with similar commands

silk star
#

what if I don't clone a repo but instead just open a random folder on my computer and then work on it... do git... then push it to github just like that .... I want it to create a repo for it ... (is that not possible with git ?)

novel shore
#

all this crap is in the .git hidden dir you will find in the cloned dir

silk star
#

where do you usually clone ripos ? on desktop ?

novel shore
#

I keep a ~/git dir

novel shore
#

I just create the repo on the website and clone it

silk star
#

oh so you create the repo on the website... and clone it... and then (alright I have the repo I cloned it) ( I liek the git dir... I like that so it's in git dir so what now ? )

novel shore
#

Now it's just like any other dir. Create and edit files

silk star
#
┌──(dex㉿archlinux1)-[~]
└─$ mkdir git

┌──(dex㉿archlinux1)-[~]
└─$ cd git

┌──(dex㉿archlinux1)-[~/git]
└─$ git clone https://github.com/DexGith/arch_dex.git
Cloning into 'arch_dex'...
warning: You appear to have cloned an empty repository.

┌──(dex㉿archlinux1)-[~/git]
└─$ ls
arch_dex

┌──(dex㉿archlinux1)-[~/git]
└─$
novel shore
#

then git status to see what git reckons

#

cd arch_dex
touch testfile
git status

silk star
#

┌──(dex㉿archlinux1)-[~]
└─$ mkdir git

┌──(dex㉿archlinux1)-[~]
└─$ cd git

┌──(dex㉿archlinux1)-[~/git]
└─$ git clone https://github.com/DexGith/arch_dex.git
Cloning into 'arch_dex'...
warning: You appear to have cloned an empty repository.

┌──(dex㉿archlinux1)-[~/git]
└─$ ls
arch_dex

┌──(dex㉿archlinux1)-[~/git]
└─$
#

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$ touch testfile

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$ git status
On branch main

No commits yet

Untracked files:
  (use "git add <file>..." to include in what will be committed)
    testfile

nothing added to commit but untracked files present (use "git add" to track)

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$
novel shore
silk star
#
┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$ git add testfile

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$ git status
On branch main

No commits yet

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)
    new file:   testfile


┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$
novel shore
#

Now if you git commit -a -m "this is a commit message, it makes sense to make them descriptive of what you have changed" it will commit the changes

#

That basically logs stuff into your local git

#

And then finally git push to push to the remote

silk star
#
┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$ git commit -a -m "testing learning git for the first tiem "
[main (root-commit) 37fd0cc] testing learning git for the first tiem
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 testfile

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$
silk star
novel shore
#

Hmm yeah, I forgot about that. github requires authentication

#

Sadly despite it asking for your username and password, it does not accept them...

silk star
#

you see my passwrod starts with WQ#K********** very long .. (it's keeypass passwrod.. ) so i coppied it and then ctrl+shift+v on terminal and it faield

novel shore
#

You need to set up either SSH with that link or I believe you can get an auth token on github somewhere

#

basically a long-ass temporary password

silk star
#

alright how do I do that ... I want my testfile to git push and see it... that would be sick

novel shore
#

the link is the best approach. Basically you need to generate a key on your PC, paste that key into github as an auth key for your account

#

And then set up ssh on your device so git uses that ssh key when connecting

#

It's not that hard

#

In fact if you have set up publickey ssh before then it's quite simple. The hardest part for me was finding where in github it wanted the public key

silk star
#

what are thees types ?

novel shore
#

Auth is for pushing/pulling (via ssh), then signing keys allow you to sign code on github

#

So people know it came from you

silk star
#

sign code on github that's new to me... well it's another topic right ?

novel shore
#

Ever had to pacman-key --refresh? That sorta thing

silk star
#

so I'm good I just past the Key I cat it it in terminal and coppied it to clibparod

novel shore
silk star
#

ok so how do I copy past it which one ? I beleive the ssh right ... so I copy and past all those like random stuff into the KEY forum on github ?

novel shore
#

The smaller one, private stays private

silk star
#

ssh.pub is the smaller one... so it's private ? it stays on the computer ?

novel shore
#

The smaller key is your public key and is what github wants

silk star
#

yeah makes sense it has the email in there

novel shore
#

Your private key stays on your PC and is what is used with the public key to verify

silk star
#

makes sense that's what it's called .pub (public

#

alright

novel shore
#

github waves your pub key at your PC and goes "this you?" and your PC does some magical maths with the priv key and says Y or N

silk star
#

done so now I can always connect to github via ssh... this way I can push... so it's done now we are back to git push right ?

silk star
novel shore
#

You need to tell your local ssh stuff to use the key, the ssh-agent stuff in the tutorial link

#

After that it should be good to go

#

If you save the ed25519 in your ~/.ssh then it might even work already. Chec your /etc/ssh/ssh_config and /etc/ssh/sshd_config

silk star
#

I beleive i did ssh-add ~/git/ssh how can i confirm that it's using it ?

novel shore
#

I've not used ssh-agent so I can't say. I just added a IdentityFile line in /etc/ssh/ssh_config

#

The last thing to consider is that your local git clone is using https at the moment, not ssh. Two ways around that

  • mess around with git remote commands to update the remote repo so your pushes go to ssh
  • delete it, and git clone with ssh instead
silk star
#

why add IdentityFile in ssh_config?

novel shore
#

ssh-agent probably does that

#

I just added it manually because I don't know about that tool

silk star
#

mine doens't have that

#

oh it does

#

but commented out

novel shore
#

Perhaps it will just work, I might be confusing matters with my own config

silk star
novel shore
#

If the key has a weird name or is in a wierd place it might get missed

silk star
#

yeah it has a weird name and it's in a weird place

novel shore
#

give it a spin, see what it says

silk star
#

well

#

time to break something i guess

novel shore
#

on github the shiny green clone button has a window for ssh, grab that command and clone it again

#

Then make a file, git add, commit and push

#

and cross your fingers

silk star
#

now what's next

#

ah

#

alright

#

so

novel shore
#

Is it a public repo? If it's private, if it cloned with no complaint then it works

#

If it's public then anyone can clone it, so you will have to try a push to confirm

silk star
#

umm so ? am i doing everything correct ?

novel shore
#

I think you're good!

silk star
#

public

novel shore
#

It challenged you for the ssh thing, which is a very good sign

silk star
#

alright so cd into the dir make a file and git status to check then git add the file then git push?

novel shore
#

yup

#

status isn't strictly necessary but sanity checks are always nice

silk star
#

git push ?

novel shore
#

Oh, commit first as well

silk star
#

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$ git push
error: src refspec refs/heads/main does not match any
error: failed to push some refs to 'github.com:DexGith/arch_dex.git'

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$

#

oh yeah

#
┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$ git push
error: src refspec refs/heads/main does not match any
error: failed to push some refs to 'github.com:DexGith/arch_dex.git'

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$ git commit -a -m "testing this ssh push thing"
[main (root-commit) 4f7cb0d] testing this ssh push thing
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 testfile

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$ git push
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 223 bytes | 111.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
To github.com:DexGith/arch_dex.git
 * [new branch]      main -> main

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$
novel shore
#

🎉

silk star
#

wow

#

we did this wow ... not i'm a github user

novel shore
#

It's all downhill from here!

silk star
#

now the real challenge... alright i copy pasted tons of stuff ... so how do I git add recursive

#

xdd I don't want to git add file every single time lol

novel shore
#

git add * I believe

#

It does pay to be selective and careful, and also making a .gitignore

#

That file does what it implies - anything in that file gets completely ignored by git, can't even accidentally push stuff in there

silk star
#
┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$ ls
⁄home⁄dex  testfile

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$ git status
On branch main
Your branch is up to date with 'origin/main'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
    "\342\201\204home\342\201\204dex/"

nothing added to commit but untracked files present (use "git add" to track)

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$

weird now... that I like coppied the fodler it has these like numbers

\342\201\204home\352\201\204dex/ llol

#

well I guess i'm typing that

#
┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$ git add *
error: '⁄home⁄dex/' does not have a commit checked out
fatal: adding files failed

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$ git commit -a -m "testing this ssh push thing part 2"
On branch main
Your branch is up to date with 'origin/main'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
    "\342\201\204home\342\201\204dex/"

nothing added to commit but untracked files present (use "git add" to track)

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$ git add *
error: '⁄home⁄dex/' does not have a commit checked out
fatal: adding files failed

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$

@novel shore

PLEASE HELP? this is getting out of hand

novel shore
#

what is this /home/dex/? It's as if the / are characters instead of separating directories

#

That would explain the funny codes

silk star
#

I mean... I can't have / named folder ?

novel shore
#

how did you get /home/dex/ in this dir?

silk star
#

cuz I renamed the folder to /home/dex

#

umm do I have to like make a folder home then put the files then inside it make dex then put the files ?

novel shore
#

Ah I didn't mean to reply with that comment

silk star
#
┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$ ls
home  testfile

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$ git status
On branch main
Your branch is up to date with 'origin/main'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
    home/

nothing added to commit but untracked files present (use "git add" to track)

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$ git add home/
error: 'home/dex/' does not have a commit checked out
fatal: adding files failed

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$
#

I don't git it... I should learn git

novel shore
#

Can you show me an ls -R?

silk star
#
┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$ ls -R
.:
home  testfile

./home:
dex

./home/dex:
package_list_explicit.txt  package_list_foreign.txt  scripts

./home/dex/scripts:
bin  scripts

./home/dex/scripts/bin:
rofi-window-switcher.that.doenst.work  switch_ob_config.sh

./home/dex/scripts/scripts:
ahk        hotkeys   switch_and_activate_alt_and_3_deskflow.sh
autostart  practice  switch_and_activate_alt_and_3_deskflow.sh.bak.original.working
ddesk      python    testinglocation.sh

./home/dex/scripts/scripts/ahk:
testing.ahk

./home/dex/scripts/scripts/autostart:
xmodmap

./home/dex/scripts/scripts/ddesk:
'['   ]   ]]   nothing

'./home/dex/scripts/scripts/ddesk/[':
'[['   '[[.cli'          '[music'        '[phone.sync'         '[scripts.cli'
'[]'   '[].cli'          '[music_fav'    '[screenshots'        '[videos'
'[]]'  '[]].cli'         '[nothing'      '[screenshots.phone'  '[videos.cli'
'[~'   '[dolphin.trash'  '[nothing.cli'  '[scripts'

./home/dex/scripts/scripts/ddesk/]:
]btop         ]mixer               ]ob.desktop  ]ob.mygame  ]taskmgr-xfce4
]hot.default  ]mouse_focus_toggle  ]ob.general  ]ob.pg      ]top
]hot_on       ]nv.mygame           ]ob.hacker   ]phone      ]virt
]htop         ]nv.mygame.events    ]ob.linux    ]pwsh

./home/dex/scripts/scripts/ddesk/]]:
]]e.bash  ]]e.nv       ]]fa   ]]fe.nn.home   ]]fo          ]]r.xbind
]]e.h     ]]e.openbox  ]]fao  ]]feo          ]]fo.scripts
]]e.hmap  ]]f          ]]fe   ]]feo.nn.home  ]]f.scripts

#
./home/dex/scripts/scripts/ddesk/nothing:
 autoshot.sh                        leaf_myfirst_script_wrapper
 capslock_doubledots_q_quit         nvim_capslock_send_at_for_macro
 capslock_doubledots_w_save         nvim_c-h_c-left
 capslock_movewindow_away           proj~move_win_to_next_monitor_old_works_slow
 capslock_movewindow_away.bak       rename_window.sh
 capslock_movewindow_away_method2   restore_windows_to_normal
 capslock_movewindow_to_mouse_pos   rofi_alt_per_tab_scuffed
 capslock_neovim_copy_hotkey        rofi_alt_per_tab_scuffed.bak
 capslock_neovim_past_hotkey        rofi.clear.history
 capslock_terminal_move_big         sticky_window_toggle
 capslock_tmux_ctrl_d              'thorium bookmarks vimum'
 display_off                       'thorium google'
 flameshotdelayed.sh               'thorium youtube default'
 fleet.note.sh                     'thorium youtube new window'
'google ai'                         work_in_progress~capslock_doubledots_w_save

./home/dex/scripts/scripts/hotkeys:
capslock_on_of

./home/dex/scripts/scripts/practice:
bash

./home/dex/scripts/scripts/practice/bash:
leaflet.sh  linux_spu.sh  mousecheck.sh

./home/dex/scripts/scripts/python:
py_spy.py

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$
#

(yeah a lot of rofi + fzf scripts I use from time to time )

novel shore
#

Oh I see

silk star
#

there are also . files that don't shw in the ls -R

novel shore
#

You can add -a for that

silk star
#

add -a ? so git add -a ?

novel shore
#

That's for ls

#

I think now git add * would do it, but do you really want all your home on github?

silk star
#

oh i'm dumb

#

there is a .git in side

#

there is a .git in ~/git/arch_dex/hom/dex/

novel shore
#

It's getting a bit circular logic :D

silk star
#

maybe this is the issue ?

novel shore
#

Each git repo you clone/create gets a .git dir, that's where all the info lives

silk star
#

so it's no problem having 2 .git inside 1 folder ? well they are not in the same dir but you got the point

novel shore
#

I'm not 100% sure to be honest. I hope they thought of that when writing it though

silk star
#

well I've never seen a repo that has a .git in my life if i recall

#

so that's a bad sign

novel shore
#

copying the whole of home over is probably a bad idea tbh

ripe garden
silk star
silk star
novel shore
#

git commiting home will have weirdness that I'm not sure is git compatible, like symlinks and other FS stuff. git is mainly meant for simple files laid out in simple filesystems

#

like source code

#

Any file/dir starting with . is hidden from ls and file managers by default

silk star
#
┌──(dex㉿archlinux1)-[~/git]
└─$ cd arch_dex

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$ ls
home  testfile

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$ git status
On branch main
Your branch is up to date with 'origin/main'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
    home/

nothing added to commit but untracked files present (use "git add" to track)

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$ git add home/
warning: adding embedded git repository: home/dex/.config/nvim
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint:     git submodule add <url> home/dex/.config/nvim
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint:     git rm --cached home/dex/.config/nvim
hint:
hint: See "git help submodule" for more information.
hint: Disable this message with "git config set advice.addEmbeddedRepo false"
warning: adding embedded git repository: home/dex/.tmux/plugins/tmux-continuum
warning: adding embedded git repository: home/dex/.tmux/plugins/tmux-resurrect
warning: adding embedded git repository: home/dex/.tmux/plugins/tmux-sensible
warning: adding embedded git repository: home/dex/.tmux/plugins/tpm

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$
novel shore
#

Ah cool they did think of it!

silk star
#

now when I removed the .git in ~/git/arch_dex/home/dex/.git it gives me this

novel shore
#

I sustain that committing home is a bad idea, I wouldn't try it and expect it to just work

silk star
#

oh i have another git inside the

#

nvim

#

lol

#

so

#

umm so I guess i'm removing it

#

alright i'll see if init.vim is there ... should be in arch_dex/home/dex/.config/nvim/init.vim

#

@novel shore ummm

#

I don't get it

#

other files are fine

novel shore
#

could be a symlink perhaps?

#

I've not seen that before

silk star
#
┌──(dex㉿archlinux1)-[~/…/arch_dex/home/dex/.config]
└─$ cd nvim

┌──(dex㉿archlinux1)-[~/…/home/dex/.config/nvim]
└─$ ls
init.vim

┌──(dex㉿archlinux1)-[~/…/home/dex/.config/nvim]
└─$ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean

┌──(dex㉿archlinux1)-[~/…/home/dex/.config/nvim]
└─$ mv init.vim init.vim
mv: 'init.vim' and 'init.vim' are the same file

┌──(dex㉿archlinux1)-[~/…/home/dex/.config/nvim]
└─$ mv init.vim init.vim.back

┌──(dex㉿archlinux1)-[~/…/home/dex/.config/nvim]
└─$ cp init.vim.back init.vim

┌──(dex㉿archlinux1)-[~/…/home/dex/.config/nvim]
└─$ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean

┌──(dex㉿archlinux1)-[~/…/home/dex/.config/nvim]
└─$ ..

┌──(dex㉿archlinux1)-[~/…/arch_dex/home/dex/.config]
└─$ ..

┌──(dex㉿archlinux1)-[~/git/arch_dex/home/dex]
└─$ ..

┌──(dex㉿archlinux1)-[~/git/arch_dex/home]
└─$ ..

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$ ls
home  testfile

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$ ls -la
total 16
drwxr-xr-x 4 dex dex 4096 Jul 12 20:55 .
drwxr-xr-x 4 dex dex 4096 Jul 12 20:45 ..
drwxr-xr-x 7 dex dex 4096 Jul 12 21:13 .git
drwxr-xr-x 3 dex dex 4096 Jul 12 20:56 home
-rw-r--r-- 1 dex dex    0 Jul 12 20:47 testfile

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$
#

umm

#

I made a bakup.. and coppied the bakcup xdd and did git status i see nothing changed

novel shore
#

Has anything changed since the last commit?

silk star
#

wait wtf xdd I see my .ssh in there... I guess making that public is probably bad right ? (well it only works on my LAN)

ripe garden
silk star
silk star
novel shore
#

everything is saved from past commits

#

You might wanna regenerate those keys

silk star
#

how

#

ok let's just remove that .git

#

or maybe I should clone the repo again

#

then manually add the file and check again ?

#

so sick that I can remove it and add it just like that so sick

novel shore
#

consider what stage in the process you're at

#

local editing files -> git add files -> git commit local changes -> git push

#

the last one is where it leaves your machine

#

everything up until that point can be un-fucked

silk star
#
┌──(dex㉿archlinux1)-[~/git]
└─$ git clone [email protected]:DexGith/arch_dex.git
Cloning into 'arch_dex'...
remote: Enumerating objects: 309, done.
remote: Counting objects: 100% (309/309), done.
remote: Compressing objects: 100% (192/192), done.
remote: Total 309 (delta 59), reused 305 (delta 58), pack-reused 0 (from 0)
Receiving objects: 100% (309/309), 1.28 MiB | 79.00 KiB/s, done.
Resolving deltas: 100% (59/59), done.

┌──(dex㉿archlinux1)-[~/git]
└─$ ls
arch_dex  ssh_key

┌──(dex㉿archlinux1)-[~/git]
└─$ cd arch_dex

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$ ls
home  testfile

┌──(dex㉿archlinux1)-[~/git/arch_dex]
└─$ cd home/dex/.config/nvim

┌──(dex㉿archlinux1)-[~/…/home/dex/.config/nvim]
└─$ ls

┌──(dex㉿archlinux1)-[~/…/home/dex/.config/nvim]
└─$ cp ~/.config/nvim/init.vim .

┌──(dex㉿archlinux1)-[~/…/home/dex/.config/nvim]
└─$ ls
init.vim

┌──(dex㉿archlinux1)-[~/…/home/dex/.config/nvim]
└─$ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean

┌──(dex㉿archlinux1)-[~/…/home/dex/.config/nvim]
└─$

this is weird

silk star
ripe garden
#

cd

silk star
#
┌──(dex㉿archlinux1)-[~/…/home/dex/.config/nvim]
└─$ pwd
/home/dex/git/arch_dex/home/dex/.config/nvim

┌──(dex㉿archlinux1)-[~/…/home/dex/.config/nvim]
└─$ touch something

┌──(dex㉿archlinux1)-[~/…/home/dex/.config/nvim]
└─$ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean

┌──(dex㉿archlinux1)-[~/…/home/dex/.config/nvim]
└─$ ls
init.vim  something

┌──(dex㉿archlinux1)-[~/…/home/dex/.config/nvim]
└─$
ripe garden
silk star
#

did that

ripe garden
#

mkdir .config

#

cp ~/.config/nvim .config

silk star
#

alright so I think that folder is bugged

#
┌──(dex㉿archlinux1)-[~/…/arch_dex/home/dex/.config]
└─$ ls
alacritty  Deskflow  input-remapper-2  kitty  nvim     openrazer  sublime-text
copyq      espanso   keepassxc         nnn    openbox  rofi       waybar

┌──(dex㉿archlinux1)-[~/…/arch_dex/home/dex/.config]
└─$ ..

┌──(dex㉿archlinux1)-[~/git/arch_dex/home/dex]
└─$ ls
package_list_explicit.txt  package_list_foreign.txt  scripts

┌──(dex㉿archlinux1)-[~/git/arch_dex/home/dex]
└─$ touch something

┌──(dex㉿archlinux1)-[~/git/arch_dex/home/dex]
└─$ git status
On branch main
Your branch is up to date with 'origin/main'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
    something

nothing added to commit but untracked files present (use "git add" to track)

┌──(dex㉿archlinux1)-[~/git/arch_dex/home/dex]
└─$
silk star
#

alright

#
──(dex㉿archlinux1)-[~/…/arch_dex/home/dex/.config]
└─$ git status
On branch main
Your branch is up to date with 'origin/main'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
    test
    ../something

nothing added to commit but untracked files present (use "git add" to track)

┌──(dex㉿archlinux1)-[~/…/arch_dex/home/dex/.config]
└─$ rm nvim
rm: cannot remove 'nvim': Is a directory

┌──(dex㉿archlinux1)-[~/…/arch_dex/home/dex/.config]
└─$ rm -rf nvim

┌──(dex㉿archlinux1)-[~/…/arch_dex/home/dex/.config]
└─$ md nvim

┌──(dex㉿archlinux1)-[~/…/arch_dex/home/dex/.config]
└─$ git status
On branch main
Your branch is up to date with 'origin/main'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
    test
    ../something

nothing added to commit but untracked files present (use "git add" to track)

┌──(dex㉿archlinux1)-[~/…/arch_dex/home/dex/.config]
└─$ ls
alacritty  Deskflow  input-remapper-2  kitty  nvim     openrazer  sublime-text  waybar
copyq      espanso   keepassxc         nnn    openbox  rofi       test

┌──(dex㉿archlinux1)-[~/…/arch_dex/home/dex/.config]
└─$ cd nvim

┌──(dex㉿archlinux1)-[~/…/home/dex/.config/nvim]
└─$ ls

┌──(dex㉿archlinux1)-[~/…/home/dex/.config/nvim]
└─$ touch test
#

┌──(dex㉿archlinux1)-[~/…/home/dex/.config/nvim]
└─$ ls
test

┌──(dex㉿archlinux1)-[~/…/home/dex/.config/nvim]
└─$ git status
On branch main
Your branch is up to date with 'origin/main'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
    ../test
    ../../something

nothing added to commit but untracked files present (use "git add" to track)

┌──(dex㉿archlinux1)-[~/…/home/dex/.config/nvim]
└─$ touch hello

┌──(dex㉿archlinux1)-[~/…/home/dex/.config/nvim]
└─$ git status
On branch main
Your branch is up to date with 'origin/main'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
    ../test
    ../../something

nothing added to commit but untracked files present (use "git add" to track)

┌──(dex㉿archlinux1)-[~/…/home/dex/.config/nvim]
└─$
#

well I guess my folder is bugged or something

novel shore
#

I still maintain doing this with home is a bad idea, as has been shown!

novel shore
#

Keep it simple. I think the most I've ever committed is a few thousand files in a single dir, that I knew exactly what they were

#

and pushing your .ssh is a significant cockup

#

That's the kind of thing that gets you actually hacked

#

Nefarious people will have bots watching github exactly for stuff like that

silk star
#

done

#

I just redid everything from scratch I deleted the repo

#

cloned an empty repo

#

this type I coppied the files without .git inside of them

#

and yeah everything works... do not have more than 1 .git inside dir noted

#

@novel shore @ripe garden thanks a lot ❤️ got this done.. and now i can sync stuff to my github sick now I can format this computer again

rustic lindenBOT
#

mushroom.botherer, and killertofus received a thank you cookie!

silk star
#

[SOLVED] How do I make or sync backups of .zshrc and important files from my arch to github