Friday, June 25, 2021

How to Add Master Branch in GIT | How to Add Master Branch in AWS CodeCommit

 

1 => Take git clone from blank repo of CodeCommit or GIT .

Note: Make sure before starting this process you have done your GIT access configuration on your system.


#cd /var/www/html/ 


# git clone  (your git repo url) project

Example :
#git clone ssh://git-codecommit.us-east-2.amazonaws.com/v1/repos/project project


Cloning into 'project'...
warning: You appear to have cloned an empty repository.


2 => Now copy you project in project folder 

rsync -a Colibrism/ project/

=> verify your files 

ls project

=> Now go inside project folder 

#cd project

=> Now add all your files and folder in git add 

#git add .

=> Use git status in your bash to view all the files which are going to be staged to the first commit

#git status

On branch master


No commits yet


Changes to be committed:

  (use "git rm --cached <file>..." to unstage)

new file:   .DS_Store

new file:   api.php

new file:   apps/.DS_Store

new file:   apps/native/.DS_Store

new file:   apps/native/ajax/.DS_Store

new file:   apps/native/ajax/ads/content.php

new file:   colibri-db.sql

new file:   index.php

new file:   nginx.conf

new file:   robots.txt

new file:   update.php

new file:   upload/.DS_Store

new file:   upload/default/avatar.png

new file:   upload/default/cover.png

new file:   web.config



3 => Set your mail id  and name for your identity

 
# git config --global user.email "Your mail ID"

Example# git config --global user.email "nirmal@gmail.com"
 

# git config --global user.name "Your Name"

Example# git config --global user.name "Nirmal Singh" 

4 => Now commit your files in master branch



# git commit -m "Master branch data"

git commit -m "Master branch data"

[master (root-commit) 23db1fc] add first file

 15 files changed, 1471 insertions(+)

 create mode 100644 .DS_Store

 create mode 100755 api.php

 create mode 100644 apps/.DS_Store

 create mode 100644 apps/native/.DS_Store

 create mode 100644 apps/native/ajax/.DS_Store

 create mode 100644 apps/native/ajax/ads/content.php

 create mode 100755 colibri-db.sql

 create mode 100755 index.php

 create mode 100644 nginx.conf

 create mode 100755 robots.txt

 create mode 100755 update.php

 create mode 100644 upload/.DS_Store

 create mode 100755 upload/default/avatar.png

 create mode 100755 upload/default/cover.png

 create mode 100755 web.config 

5 => Now push your master  code on server


# git push origin master

Warning: Permanently added the RSA host key for IP address '52.95.19.19' to the list of known hosts.

Enumerating objects: 23, done.

Counting objects: 100% (23/23), done.

Delta compression using up to 4 threads

Compressing objects: 100% (22/22), done.

Writing objects: 100% (23/23), 17.71 KiB | 2.95 MiB/s, done.

Total 23 (delta 4), reused 0 (delta 0), pack-reused 0

To ssh://git-codecommit.us-east-2.amazonaws.com/v1/repos/project

 * [new branch]      master -> master




6 => Now verify your data in AWS CodeCommit in AWS account 








No comments:

Post a Comment

Installing Jenkins on RHEL 8 is a straightforward process. Here's a step-by-step guide

Introduction  Jenkins is an open-source automation server widely used for continuous integration (CI) and continuous delivery (CD) pipelines...