Skip to content

Instantly share code, notes, and snippets.

View Regis011's full-sized avatar
:octocat:

Vladimir Rancic Regis011

:octocat:
View GitHub Profile
@Regis011
Regis011 / git-overwrite-branch.sh
Created October 14, 2023 14:19 — forked from ummahusla/git-overwrite-branch.sh
Git overwrite branch with another branch
# overwrite master with contents of feature branch (feature > master)
git checkout feature # source name
git merge -s ours master # target name
git checkout master # target name
git merge feature # source name
@Regis011
Regis011 / Deploy script instruction
Last active September 17, 2020 06:51 — forked from francoisromain/project-create.sh
A bash script to create a Git post-receive hook to deploy after a Git push
Git is a great tool for version control, but not only. It can also simplify the deployment process, thanks to Git Hooks.
Three steps to configure the deployment process:
Image for post
1. Create an empty Git repo on the server
2. Write a Git Hook to deploy the code
3. Deploy from the local computer
tl;dr
On the remote server:
# Copy the 'project-create.sh' bash script https://gist.github.com/francoisromain/58cabf43c2977e48ef0804848dee46c3
# Then create a new project
@Regis011
Regis011 / git-deployment.md
Created September 17, 2020 06:44 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.