DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Mastering Git
  • Runtime FinOps: Making Cloud Cost Observable
  • Shrink a Bloated Git Repository and Optimize Pack Files
  • Developer Git Commit Hygiene

Trending

  • Using LLMs to Generate Unit Tests and Review Pull Requests in Spring Boot
  • The KV Cache Is Optional Now: What Mercury 3's 1000 tok/s Means for the Inference Serving Stack
  • The Rise of the Unsanctioned Agent Swarm
  • Where the Model Stops and the Code Starts: Lessons From an AI Procurement Agent

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  1. DZone
  2. Data Engineering
  3. Databases
  4. Configuring Git on Oracle Data Science Cloud Service

Configuring Git on Oracle Data Science Cloud Service

By 
Emrah Mete
·
Apr. 07, 20 · Tutorial
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
13.3K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

Hello to everyone!

In this article, we will establish a connection between Oracle Data Science Cloud Service and our remote Git repository. We will then send the code to our remote repository via the Data Science Cloud service. I hope it will be a useful article in terms of awareness.

Many Python libraries are available in Oracle's Data Science Cloud service. We can easily install libraries that are not installed from the terminal interface. Git is one example of software already installed in Oracle Data Science Cloud Service. You can open the terminal screen and check this setup with the command below.

Shell
 




xxxxxxxxxx
1


 
1
conda list



Conda list command output

Conda list command output
Yes, as you can see, it is ready to use Git in our service. Now, let's look at how to connect our remote repository. I will use  my own Github account  for this.

Now, I want to go to the /blockstorage directory and create the directory where I will clone my remote repository. At this point, I would like to remind you of the following information. When you stop the operation of your notebook (deactivation process via screens) in Oracle Data Science Cloud Service, you should definitely move the work that you do not want to be lost into the /blockstorage directory.

Otherwise, you may encounter a situation where your work is deleted. For this reason, I suggest you do your work under the blockstorage directory.

Now, let's create a directory where we will hold the warehouse. Then, we'll do our repository configurations.
Shell
xxxxxxxxxx
1
13
 
1
cd block_storage
2
3
mkdir GitRepo 
4
5
cd GitRepo 
6
7
git init 
8
9
git config --global user.email "[email protected]" 
10
11
git config --global user.name "emrahmete" 
12
13
git clone https://github.com/emrahmete/codebase


Yes, we have cloned our remote Git repository. When we look inside the GitRepo directory we created in the /blockstorage directory, we will see that our entire repository has been copied.

Shell
xxxxxxxxxx
1
 
1
cd /home/datascience/block_storage/GitRepo 
2
3
ls -al


We saw that our codebase folder is coming. In this folder, we can access the code whenever we want, open and change it, and send it to our remote repository. Now, let's create a new file in the GitRepo directory, where I created a copy of our repository, and send it to our remote repository.

I will put my new file under the /home/datascience/block_storage/GitRepo/codebase/oracle/oml directory in my repository. Then, I will send it to the remote server from here. So let's start doing our operations.

Shell
xxxxxxxxxx
1
 
1
cd /home/datascience/block_storage/GitRepo/codebase/oracle/oml 
2
3
echo 'Cloud Repo Test' > cloudtest.dat 
4
5
ls -al more cloudtest.dat 
6
7
git add . 
8
9
git commit -m "DS Cloud Service Commit Test"


First of all, we wrote a simple text and created our cloudtest.dat file and committed this file to our local Git repository. Now, we have to push our remote Git repository. To do this, we will need to authorize a remote Git repository using our credentials on the screen. When the information is verified, our code will be sent to the remote server.

Shell
xxxxxxxxxx
1
 
1
git push


Pushing commits

Pushing commits

Yes, we have committed the newly created file in our local to the remote repo. Now, we can check if the file is going from the GitHub interface.

As we have seen, we have been able to send code very easily to our remote Git repository via Oracle Data Science Cloud Service.

Data science Git Cloud Repository (version control) workplace Directory

Opinions expressed by DZone contributors are their own.

Related

  • Mastering Git
  • Runtime FinOps: Making Cloud Cost Observable
  • Shrink a Bloated Git Repository and Optimize Pack Files
  • Developer Git Commit Hygiene

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook