Skip to content

Act as reference to initialize repository for new GARAIO Projects

Notifications You must be signed in to change notification settings

garaio/garaiotemplaterepo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GARAIO Template Repository

Act as reference for the initialization of new GARAIO source repositories.

Usage

The script might be executed within;

  • A freshly newly created directory on your local machine that will then be pushed to a git origin to start a repository.
  • A already existing empty repository (or almost empty) that has been cloned locally.

Requirements

Ensure you've the git's user.name and user.email set either localy or globaly prior running the script.

Procedure

Within the directory you want to setup (either empty or cloned working copy).

Run the Init-Repository.ps1 within a PowerShell Command Prompt.

 Invoke-Expression (Invoke-WebRequest -Uri https://raw.githubusercontent.com/garaio/garaiotemplaterepo/main/src/init-script/Init-Repository.ps1)

What it will do

The scripts do the following steps

  1. Check if the current repository already has .git-directory. If none is found git init is invoked
  2. Create the structure according to the GARAIO-Blueprint; within each directory a .gitkeep file is created that can be later-on deleted once the directory receives its final content.
  3. Place at root of the repository
  4. Within the src/web/ directory the Node.gitignore file
  5. Adds to the git index the above files and directories and initate the first commit
  6. Create the develop/ git branch

Pushing the changes

The method to push your changes will depend whether your directory was cloned repository already linked to an existing git remote, or if you have started from an newly locally-created empty directory.

You can check if your local working copy is linked with a git remote by using

git remote -v

Given the repository would be already linked to a remote something like should appear;

user@host garaiotemplaterepo % git remote -v
origin  https://github.com/garaio/garaiotemplaterepo.git (fetch)
origin  https://github.com/garaio/garaiotemplaterepo.git (push)

Using an existing git remote

# Pushes all locally created branches and commits to the already defined remote
git push --all

To connect a working copy to an existing remote

This will work easily only if the remote doesn't already have commits.

git remote add origin {url-to-origin}

like

git remote add origin https://github.com/garaio/garaiotemplaterepo.git

About

Act as reference to initialize repository for new GARAIO Projects

Resources

Stars

Watchers

Forks