-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcommands.sh
More file actions
39 lines (24 loc) · 732 Bytes
/
commands.sh
File metadata and controls
39 lines (24 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
# Installing git & ssh
apt install git openssh
# Configuring git username & email
git config --global user.name "username"
git config --global user.email "email@example.com"
# Creating directory to store ssh key
mkdir -p ~/.ssh
# Creating ssh key
ssh-keygen -t rsa -b 2048 -C "email@example.com" -f ~/.ssh/id_rsa
# Getting the key
cat ~/.ssh/id_rsa.pub
# Add the ssh key to your github account!
# Initialing directory and uploading for the first time to main branch
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin "https://github.com/OWNER/REPO.git"
git push -u origin main
# Upading the previous uploaded repo!
git add .
git commit -m "Update x file!"
git push