More Git instructions

Saturday, May 31, 2025 at 12:54:47

** Because I’ll forget!

Basics:

  • git add .
  • git commit
  • git push

Check for picture differences:

ls | perl -e 'while(<>){chomp;
next if (-s $_ == -s "../../original_images/$_"); 
print "$_ has sizes: TEST:".(-s $_)."  /  ORIG:".(-s "../../original_images/$_")."n";
}'

Update test area to prod area:

ls | perl -e 'while(<>){chomp;
next if (-e "../../otherpath/images/$_" && -s $_ >= -s "../../otherpath/images/$_"); 
print "$_ has sizes: TEST:".(-s $_)."  /  MAIN:".(-s "../../otherpath/images/$_")."n"; use File::Copy; copy($_, "../../otherpath/images/$_"); 
}'

Setting up some Git server things

Thursday, May 8, 2025 at 17:09:50

  • Created git user
    adduser gituser
  • Made starting directory
    mkdir /usr/local/gitpath
    chown git:git /usr/local/gitpath
  • changed to git user
    su - gituser
  • Created bare repository
    cd /usr/local/gitpath
    git init --bare newrepositoryname

To use on same machine:

  • Log in as user (not gituser)
  • cd /home/thisuser/
  • mkdir gitstuff
  • cd gitstuff
  • git config --global user.email "thisuser@localhost"
  • git config --global user.name "thisuser"
  • git clone /usr/local/gitpath/newrepositoryname
  • At this point, you have an empty directory. Add files, do ‘git add *’, then ‘git commit’, and it will be pushed to main git path.

To use on different machine (linux anyway):

  • cd /where/you/want/the/git/stuff/to/go
  • git clone ssh://gituser@gitmachine.com/usr/local/gitpath/newrepositoryname

Top of Page