Skip to content

Instantly share code, notes, and snippets.

View harisfi's full-sized avatar
🎯
Focusing

Haris F. harisfi

🎯
Focusing
View GitHub Profile
@msrose
msrose / combining-git-repositories.md
Last active November 5, 2024 10:15
How to combine two git repositories.

Combining two git repositories

Use case: You have repository A with remote location rA, and repository B (which may or may not have remote location rB). You want to do one of two things:

  • preserve all commits of both repositories, but replace everything from A with the contents of B, and use rA as your remote location
  • actually combine the two repositories, as if they are two branches that you want to merge, using rA as the remote location

NB: Check out git subtree/git submodule and this Stack Overflow question before going through the steps below. This gist is just a record of how I solved this problem on my own one day.

Before starting, make sure your local and remote repositories are up-to-date with all changes you need. The following steps use the general idea of changing the remote origin and renaming the local master branch of one of the repos in order to combine the two master branches.

@evantoli
evantoli / GitConfigHttpProxy.md
Last active November 14, 2024 06:03
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@LeonardoCardoso
LeonardoCardoso / gitzip.sh
Last active October 9, 2023 22:38
Zip folder ignoring files listed on .gitignore
#...
function gitzip() {
git archive -o [email protected] HEAD
}
#... gitzip ZIPPED_FILE_NAME
@ivansaul
ivansaul / How-to-Install-Odoo-on-Arch-Linux.md
Created November 29, 2021 06:55
How to Install Odoo on Arch Linux

How to Install Odoo on Arch Linux?

  1. Install the Odoo AUR package.
$  yay -S odoo
  1. Configuring PostgreSQL to run with Odoo It is necessary to create a new PostgreSQL user for Odoo. For that log in as the default PostgreSQL superuser, 'postgres', by executing the following command: