GitHub Repository – Configuring/Cloning

GitHub Repository – Configuring/Cloning

In this blog we will explore the basics of git repository. Git – Open source version control system for tracking changes in source code during software development. I have used github.com/ to create a repository for objects versioning. We will explore below topics in this blog. 

  • Installation of git in the Linux, Windows OS & configuration.
  • Generating ssh key for authentication git-hub account.
  • Clone the existing git-hub repository in local environment.
  • Pushing changes from local cloned repository to remote repository.

Install git:

  • To install the git in Linux: sudo apt-get install git
  • For Windows you can download it from : git-scm.com Check the version after installation

check

Below configuration required.

git config –global user.name “<<username>>”
git config –global user.email “<<email>>”

Generation SSH keys:

You can setup the ssh keys so that very time you don’t have to provide username & password for git repository while pushing changes. Refer this blog for more details help.github.com

Below command create the public & private ssh keys for your system.

$ ssh-keygen -t rsa -b 4096 -C “your_email@example.com”

$ ssh-add ~/.ssh/id_rsa

Key for Linux & Windows:

linux

win

The public key present in id_rsa.pub file you need to copy that & set in your git-hub settings. You can have multiple keys in git-hub account.

keys

Cloning existing git-hub repository:

You can clone the remote repository in your local environment. After that you can make changes & later push to remote location.

Created a repository using the github.com/

repocrete

Repository Created: I have some files in it. Copy SSH link so that we clone the repo.

test

git clone git@github.com:shobhit-singh/test-dev-repo.git

clone
After doing some changes in any file you can check the status of git.

git status

status

Pushing local changes to remote repository:

To push the changes from local to remote repository.

git add . --all
git commit -m 'insert comments here'
git push

git push

Checking object in git-hub:

git

Commands:

git clone git@github.com:shobhit-singh/test-dev-repo.git
git status
git add . --all
git commit -m 'insert comments here'
git push

For creating new repository from command line refer this blog: GitHub Repository Creation – Command Line


Thanks!

Happy Learning! Your feedback would be appreciated!

GitHub Repository Creation – Command Line

In this blog we will explore how we can add new repository in GitHub using  API & adding the new project in that repository.

For configuring git refer this blog: Exploring Git – Configuring GitHub Repo


Creating GitHub Repository:

Let’s create a empty repository in git-hub using the API.

sudo apt install curl
curl -u ‘username’ https://api.github.com/user/repos -d ‘{“name”:”first-project”}’

curl

Empty repository has been created in git-hub account, copy the remote URL.

github

Creating Project Files:

I have created project folder ‘first-project’  in local environment inside that one file is created.

1

Initializing, Add & Commit

Initializing the new project using git init, adding the protect to stage using git add & commit.

inti

Adding URL & Push:

Using below commands you can push your local code in remote new git repository.

push

Check the files in git-hub repository.

creatd repo

Commands:

 
$ sudo apt install curl
$ curl -u 'shobhit-singh' https://api.github.com/user/repos -d '{"name":"first-project"}'

$ git init
$ git add .
$ git commit -m "Initial commit"
$ git remote add origin git@github.com:shobhit-singh/first-project.git
$ git remote -v
$ git push origin master

 

To clone existing repository : Refer this blog Exploring Git – Configuring GitHub Repo


Thanks!

Happy Learning! Your feedback would be appreciated!

ODI 12c | Version Control System Setup – Git

In this blog we will see step by step how we can setup the version control in ODI 12c using git. Git – open source version control system for tracking changes in source code during software development. I have used github.com/ to create a repository for my ODI 12c objects versioning.


Step 1: Created a repository using the github.com/

1

Copy the git url for you repository.

https://github.com/shobhit-singh/odi12c-repo.git

2

Step 2: Open the ODI Studio & change your “Version Control Management System” to git by default it was set to ODI.

3

4

Step 3: Setup the git, go to setting & edit connection.

5

Provide the git url, github repository. Change the authentication to SSL.

6

Accept the server certificate.

7

Step 3: Clone remote repository with local folder.

8

9

10

Step 4: Click on configure to setup the branch. I have selected the master branch & save the settings.

11

12

Adding ODI Object First Time in VCS:

I have created the Model Folder, Sub-Model Folder, Model & Data-store in ODI.

datastore

Right Click on the Model Folder & Add to VCS, as it was new object & going first time.

13

You can select object also if you want to move child objects also. Add comments & Click on OK.

14

15

You can check the ODI Objects in GitHub.

Check the objects

Re-Adding ODI Object in VCS:

I have changed the data-store ‘TEST_TABLE’ in ODI. I have added the column in data-store. Now I have create a new version for this object. See below steps to create new version.

16

Add comments & Click on OK.

17

18

Check the version in GitHub: Now this object has 2 version.

19

 


Thanks!

Happy Learning! Your feedback would be appreciated!