HomeTutorsContact
commandline
Github Repository Basic Setup
Konrad Kuśmierz
Konrad Kuśmierz
June 21, 2020
1 min

Table Of Contents

01
Step 1 - Let's start with script.cmd
02
Step 2 - Create .gitattributes file
03
Step 3 - Create .gitignore file
Github Repository Basic Setup

Step 1 - Let’s start with script.cmd

script.cmd

@echo off
set ghuser=GH_USER
set ghrepo=GH_REPO
set ghtoken=GH_TOKEN
rem set flag=true
rmdir /Q /S .git
curl -i -X DELETE -H "Authorization: token %ghtoken%" https://api.github.com/repos/%ghuser%/%ghrepo%
git init
git status
git lfs install
git lfs track "*.*"
git config --global lfs.contenttype 0
git config --global core.autocrlf true
git add .
git add .gitattributes
git add .gitignore
git add .env.example
git commit -am.
git status
curl -H "Authorization: token %ghtoken%" https://api.github.com/user/repos -d "{ \"name\": \"%ghrepo%\" }"
git remote add origin https://github.com/%ghuser%/%ghrepo%.git
git remote set-url origin https://github.com/%ghuser%/%ghrepo%.git
git branch -M main
git push -u https://%ghtoken%@github.com/%ghuser%/%ghrepo%.git main

Step 2 - Create .gitattributes file

.gitattributes

*.* filter=lfs diff=lfs merge=lfs -text

Step 3 - Create .gitignore file

.gitignore

script.cmd

Tags

Share

Konrad Kuśmierz

Konrad Kuśmierz

Software Engineer

Founder

Expertise

devops
ai

Social Media

instagramtwitterwebsite

Related Posts

Awk Introduction
Awk Introduction
June 21, 2023
2 min