DevOps Project: Jenkins CI/CD for Kubernetes Deployments

  DevOps Tech Hub

116 Followers

GIT Commands with Bit Bucket


How to cone Bit Bucket repository

[root@Git ~]#git clone https://dptrealtime@bitbucket.org/dptrealtime/jenkins.git
Cloning into 'devops-pipeline-project'...
Password for 'https://edwiki@bitbucket.org':
remote: Counting objects: 84, done.
remote: Compressing objects: 100% (68/68), done.
remote: Total 84 (delta 27), reused 0 (delta 0)
Unpacking objects: 100% (84/84), done.
[root@Git ~]#

How to verify Git remote repository

[root@ip-172-31-22-58 ]# git remote -v
origin https://dptrealtime@bitbucket.org/dptrealtime/jenkins.git (fetch)
origin https://dptrealtime@bitbucket.org/dptrealtime/jenkins.git (push)
[root@ip-172-31-22-58 ]#

How to verify Git branches

[root@ip-172-31-22-58 project]# git branch
* master
[root@ip-172-31-22-58 project]#

How to create new branch

[root@ip-172-31-22-58 project]# git branch
feature
* master
[root@ip-172-31-22-58 project]# git checkout feature
Switched to branch 'feature'
[root@ip-172-31-22-58 project]# git branch
* feature
master
[root@ip-172-31-22-58 project]#

How to push code changes to remote repository master branch

[root@ip-172-31-22-58 ]# git push origin master
Password for 'https://dptrealtime@bitbucket.org':
Enumerating objects: 7, done.
Counting objects: 100% (7/7), done.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 387 bytes | 387.00 KiB/s, done.
Total 4 (delta 3), reused 0 (delta 0)
To https://dptrealtime@bitbucket.org/dptrealtime/jenkins.git
489ceb3..2fb240d master -> master
[root@ip-172-31-22-58 ]#

How to create Pull Request

[root@ip-172-31-22-58 ]# git branch feature
[root@ip-172-31-22-58 ]# git checkout feature
Switched to branch 'feature'
[root@ip-172-31-22-58 ]# git branch
* feature
master
[root@ip-172-31-22-58 ]# git push origin feature
Password for 'https://dptrealtime@bitbucket.org':
Total 0 (delta 0), reused 0 (delta 0)
remote:
remote: Create pull request for feature:
remote: https://bitbucket.org/dptrealtime/devops-pipeline-project/pull-requests/new?source=feature&t=1
remote:
To https://dptrealtime@bitbucket.org/dptrealtime/jenkins.git
* [new branch] feature -> feature
[root@ip-172-31-22-58 ]#

Then, Create Pull Request from Bit Bucket 


Previous Next