Automatic GIT deployment

Robi
2018-01-29 10:11

Git Deployment Guide (Git 2.13.2)

Automatic Git Installation

  1. Double click "Git Auto Install.bat"
  2. A checker will run before proceeding with the installation.
  3. If the installation is already done:
  4. The batch file will output "Git already installed!"
  5. Press ENTER to close the Installation Process.
  6. If the Git is not yet installed:
  7. The batch file will output "Installation process ongoing..."
  8. Wait until the batch file automatically closes
  9. Verify if "INSTALLATION COMPLETE!.txt" already exists inside the Git Deployment folder.

Manual Git Installation

  1. GNU General Public License - NEXT
  2. Select Destination Location - C:\Program Files\Git
  3. Select Components - Check: Windows Explorer Integration, Git Bash Here, Git GUI Here, Git LFS, Associate .git*, Associate .sh
  4. Select Start Menu Folder - Git
  5. Adjust your PATH environment - Use Git from the Windows Command Prompt
  6. Choosing HTTPS transport backend - Use the OpenSSL library
  7. Configuring the line ending conversions - Checkout Windows-style, commit Unix-style line endings
  8. Configuring the terminal emulator to use with Git Bash - Use MinTTY
  9. Conifiguring extra options - Check: Enable file system caching, Enable Git Credential Manager, Enable symbolic links

Git Setting up of Credentials (execute this only once during configuration)
git config --global user.name "nelsoft-client"
git config --global user.email nelsoft.systems@gmail.com

Cloning a repository (open bash in desired directory)
git clone https://github.com/nelsoft/nelsoft_inventory.git
git clone https://github.com/nelsoft/nelsoft_pos.git
git clone https://github.com/nelsoft/nelsoft_autosync.git
git clone https://github.com/nelsoft/RestaurantPOS.git

Setting up a gitignore (include the template along with the other files during setup)

  1. Go inside cloned repository
  2. Create a text file with the name gitignore.txt
  3. Open it in a text editor and add your rules, then save and close
  4. Hold SHIFT, right click the folder you're in, then select Open command window here
  5. Then rename the file in the command line with ren gitignore.txt .gitignore

Checking Out a Remote Branch (for clients' specific Git Branches)
git checkout

Failed Git Cloning due to Connectivity Problems

  1. Highlight the repository folder
  2. SHIFT+DELETE
  3. Execute git clone command again
  4. Repeat until successful

------------------------------UPDATING PHASE------------------------------
Updating Client's version via Git Pull (make sure current branch checked out is correct)
git pull

Google Account for nelsoft-client
nelsoft.systems@gmail.com
nelsoft121586

Github Account
nelsoft-client
nelsoft121586

How to unset GIT users

Purpose: to make sure that the clients can't pull other branches on their server

Proceed only after GIT is installed and the credentials are still saved

  1. open git bash
  2. run "git config --global --unset user.email" and "git config --global --unset user.name"
  3. open cmd
  4. run "cmdkey /delete:LegacyGeneric:target=git:https://github.com"
  5. there should be an alert "CMDKEY: Credential deleted successfully."

there is a .bat file attached which still has to be modified to find the git directory which you want to unset. 

Attached files: Git Deployment.rar, unset git user.bat

Average rating: 0 (0 Votes)

You can comment this FAQ