OroshiX Personal site and Blog

Postgres Wsl2


Connecting IntelliJ (Windows environment) to PostgreSQL (Ubuntu for Windows: WSL 2 environment)

How to connect them?

Comment 

How to initialize git LFS?


Git LFS – Large File System

In order to have a good performance, we don’t put big files in Git repositories. Sometimes, the repository won’t allow us to have files bigger than a certain size.

So in order to have them, we have to enable LFS for them.

Initialization

git lfs install       # initialize the Git LFS project
git lfs track "*.mp3" # treat all .mp3 files as large files
git lfs track "*.wav" # also treat .wav as large files (and so on)

The last two commands add some lines to a file named .gitattribute. It should now look like this:

*.mp3 filter=lfs diff=lfs merge=lfs -text
*.wav filter=lfs diff=lfs merge=lfs -text

In order to make it work correctly for all people with the project, we have to add the .gitattribute file to the repository:

git add .gitattribute              # adding the file 
git commit -m "configured git lfs" # commiting, then
git push                           # pushing

File locking

In GitLab, we have file locking ability with Git LFS. To learn more about it, see GitLab’s website

Comment 

How to get a working copy of a bare repository in git?


Bare repository to working tree

A bare repository has all the information about the git repository, but no working tree.
In order to get a working copy of a bare repository, you can type this command:

git clone path/to/bare/repo.git myCloneRepo
Comment 

Configure gitlab with docker


How to configure gitlab in order for it to run on a docker container?

Summary

  1. Install docker
  2. Create a docker-compose.yml file
  3. Launch it
  4. If you want LDAP authentication, create another docker-compose.yml
  5. Encountered problem
Comment 

How not to fast-forward merges in git?


TL;DR

git merge --no-ff zoom
Comment