Committing files to GIT (Windows)

Posted: April 30, 2018 in Linux, terraform
  • Register to Bitbucket (it’s free).
  • Create Repository

1

2

  • Copy code after registration,it will be used to connect to GIT

5

Download GIT client

Choose default editor

3

4

Start Git CMD, browse to folder where you want to store files for GIT

9

Clone  repository:

git clone https://draganvucanovic@bitbucket.org/draganvucanovic/terraform-git.git

You’ll be prompted for Bitbucket username/password

new folder (repository name) will be created, to that folder copy files you want to push to Git

6.PNG

In Git CMD, browse to that folder

Set username/email address, add files for pushing and commit it

cd terraform-git/
git config --global user.name "some@email"
git config --global user.email "some@email"
git add .
$ git commit -m "test"
git push

8

Creating SSH connection to GitHub

Open gitnbash and create key pair:

ssh-keygen

1.PNG

2.PNG

On GitHub account properties click on your account-settings

3

SSH and GPG Keys-New SSH key

4.PNG

Copy content of public key (id_rsa.pub)

Test connection:

ssh -T git@github.com

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s