User Tools

Site Tools


manage_config_with_git

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
manage_config_with_git [2025/03/11 13:25] – jianwumanage_config_with_git [2025/03/12 08:27] (current) – jianwu
Line 70: Line 70:
 done. done.
  
-=== To list all the files currently being tracked under the branch master, use ls-tree:===+=== To list all files currently being tracked under the branch master, use ls-tree:===
 <code Bash> <code Bash>
 $ git ls-tree -r master --name-only $ git ls-tree -r master --name-only
Line 280: Line 280:
 done. done.
  
-=== To list all the files currently being tracked under the branch master, use ls-tree:===+=== To list all files currently being tracked under the branch master, use ls-tree:===
 <code Bash> <code Bash>
 $ git ls-tree -r master --name-only $ git ls-tree -r master --name-only
Line 358: Line 358:
 !.gitignore !.gitignore
 !.gitconfig !.gitconfig
 +</code>
 +Another sample of ''**/etc/.gitignore**''
 +<code Bash>
 +$ cat /etc/.gitignore
 +# Ignore all
 +*
 +
 +# Unignore all start with dot files
 +!.*
 +
 +# ignore all start with dot dirs
 +#.*/
 +
 +# Unignore specific dirs
 +!apache2/
 +!ssh/
 +!ufw/
 +!samba/
 +!gdm3/
 +!timeshift/
 +!postfix/
 +!dovecot/
 +!cron.d/
 +!pam.d/
 +
 +# Unignore .json files
 +!*.json
 +
 +# Unignore .conf files
 +!*.conf
 +
 +# Unignore specific files
 +!authorized_keys
 +!id_rsa.pub
 +!known_hosts
 +!profile
 +!hostname
 +!hosts
 +!hosts.allow
 +!hosts.deny
 +!aliases
 +
 +# pam.d
 +!pam.d/atd
 +!pam.d/common-session
 +!pam.d/gdm-launch-environment
 +!pam.d/newusers
 +!pam.d/smtp
 +!pam.d/chfn
 +!pam.d/common-session-noninteractive
 +!pam.d/gdm-password
 +!pam.d/other
 +!pam.d/sshd
 +!pam.d/chpasswd
 +!pam.d/cron
 +!pam.d/gdm-smartcard
 +!pam.d/passwd
 +!pam.d/su
 +!pam.d/chsh
 +!pam.d/cups
 +!pam.d/gdm-smartcard-pkcs11-exclusive
 +!pam.d/ppp
 +!pam.d/sudo
 +!pam.d/common-account
 +!pam.d/dovecot
 +!pam.d/gdm-smartcard-sssd-exclusive
 +!pam.d/runuser
 +!pam.d/sudo-i
 +!pam.d/common-auth
 +!pam.d/gdm-autologin
 +!pam.d/gdm-smartcard-sssd-or-password
 +!pam.d/runuser-l
 +!pam.d/sudo.org
 +!pam.d/common-password
 +!pam.d/gdm-fingerprint
 +!pam.d/login
 +!pam.d/samba
 +!pam.d/su-l
 +
 +# apache2
 +!apache2/envvars
 +!apache2/conf-available
 +!apache2/conf-enabled
 +!apache2/sites-available
 +!apache2/sites-enabled
 +
 +# ssh
 +!ssh/ssh_config
 +!ssh/sshd_config
 +!ssh/ssh_host_rsa_key.pub
 +
 +# ufw
 +!ufw/ufw.conf
 +!ufw/applications.d/
 +ufw/applications.d/*
 +!ufw/applications.d/apache2-utils.ufw.profile
 +!ufw/applications.d/cups
 +!ufw/applications.d/dovecot-imapd
 +!ufw/applications.d/dovecot-pop3d
 +!ufw/applications.d/openssh-server
 +!ufw/applications.d/postfix
 +!ufw/applications.d/samba
 +
 +# postfix
 +postfix/*
 +!postfix/main.cf
 +
 +# dovecot
 +dovecot/*
 +!dovecot/conf.d/
 +dovecot/conf.d/*
 +
 +!dovecot/dovecot.conf
 +!dovecot/conf.d/10-ssl.conf
 +
 +# cron.d
 +!cron.d/anacron
 +!cron.d/clamscan
 +!cron.d/dokuwiki
 +!cron.d/e2scrub_all
 +!cron.d/php
 +!cron.d/.placeholder
 +!cron.d/sysstat
 +!cron.d/timeshift-hourly
 +
 +# ignore .tmp .org files
 +*.tmp
 +*.org
 +.bash_history
 +.lesshst
 +
 +# definisions hereunder are not necessary.
 +
 +#ignore .git/
 +.git/
 +
 +# Prerequisites
 +#*.d
 +
 +# Compiled Object files
 +*.slo
 +*.lo
 +*.o
 +*.obj
 +
 +# Precompiled Headers
 +*.gch
 +*.pch
 +
 +# Compiled Dynamic libraries
 +*.so
 +*.dylib
 +*.dll
 +
 +# Fortran module files
 +*.mod
 +*.smod
 +
 +# Compiled Static libraries
 +*.lai
 +*.la
 +*.a
 +*.lib
 +
 +# Executables
 +*.exe
 +*.out
 +*.app
 </code> </code>
  
manage_config_with_git.1741667103.txt.gz · Last modified: 2025/03/11 13:25 by jianwu