Merge branch 'master' of git.ducamps.win:vincent/notebook

This commit is contained in:
vincent 2021-04-19 20:48:24 +02:00
commit 0add0b01d3
2 changed files with 32 additions and 1 deletions

View File

@ -26,3 +26,20 @@ pg_upgrade -b /opt/pgsql-PG_VERSION/bin -B /usr/bin -d /var/lib/postgres/olddata
``` ```
- check both pg_hba.conf in new and old cluster - check both pg_hba.conf in new and old cluster
- restart server `sc-start postgresql` - restart server `sc-start postgresql`
# sequece manipulation
sequence are use to generate uniq identifier
- get sequence value
```SQL
select * from name_seq;
```
- increment sequence value
```SQL
select nextval(name_seq);
```
- set sequence value:
```SQL
select setval(name_seq,newvalue);
```

View File

@ -23,8 +23,22 @@ this will ask if you want to add each modification with this option:
## delete a file from complete history ## delete a file from complete history
be carefull can't push repo last time use be carefull can't push repo last time use
need to be in a repo with no modification
`git filter-branch --tree-filter 'rm -f passwords.txt' HEAD` ```
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch $file" HEAD
rm -rf .git/refs/original/ && git reflog expire --all && git gc --aggressive --prune
```
## create a repo from other repo subfoler
- clone the first repo
- go in this directory
- launch
```
git filter-branch --prune-empty --subdirectory-filter "subdirectory/path" master
```
- push in your new git repo
## changing email adress ## changing email adress