Skip to content

Instantly share code, notes, and snippets.

(a gist based on the old toolmantim article on setting up remote repos)

To collaborate in a distributed development process you’ll need to push code to remotely accessible repositories.

This is somewhat of a follow-up to the previous article setting up a new rails app with git.

For the impatient

Set up the new bare repo on the server:

@ismits
ismits / IsNullOrEmpty.Groovy
Created May 10, 2017 18:16
Is null or empty check in Groovy
if (!someString?.trim()) {
logger.lifecycle("the string is null or empty.")
}
@srjha
srjha / bitbucket-pipelines.yml
Created May 14, 2019 14:02
Pipeline to setup EKS with terraform on bitbucket
image: atlassian/default-image:2
pipelines:
# By default (master branch) only validation is going to be triggered
default:
- step:
deployment: test
name: EKS Infra build and validate
script:
- mkdir -p ~/bin
@mmckechney
mmckechney / ApplyNSGIfMIssing.json
Created June 20, 2019 19:34
Azure Policy to add a specified Network Security Group to a Subnet if none is specified at creation time
{
"properties": {
"displayName": "Append NSG if missing",
"description": "Sets default NSG if none is specified",
"policyType": "Custom",
"mode": "All",
"parameters": {
"nsgResourceId": {
"type": "String",
"metadata": {
@mrnabati
mrnabati / gitSolutions.md
Last active November 15, 2024 09:14
Common Git problems (and solutions!)

Working with submodules in your repository

  • Create the submodule:

    git submodule add -b master <[email protected]:MYSUBMODULE.git> <path/to/MYSUBMODULE>
    

    This creates the submodule and makes it track submodule's master branch. You can change the branch name if you want to track a different branch.

  • Change some settings. In the parent repo:

    # make it so that git status will include changes to submodules.