Google Cloud: Introduction to Cloud Source Repositories

Share At:

GCP Development : Managing Source Codes with Google Cloud Source  Repositories


Google Cloud Source Repositories provides Git version control to support collaborative development of any application or service. In this lab, you will create a local Git repository that contains a sample file, add a Google Source Repository as a remote, and push the contents of the local repository. You will use the source browser included in Source Repositories to view your repository files from within the Cloud Console.

Create a new repository

Start a new session in Cloud Shell and run the following command to create a new Cloud Source Repository named REPO_DEMO:

gcloud source repos create REPO_DEMO

You can safely ignore any billing warnings for creating repositories.

Clone the new repository into your Cloud Shell session

Clone the contents of your new Cloud Source Repository to a local repo in your Cloud Shell session:

gcloud source repos clone REPO_DEMO

The gcloud source repos clone command adds Cloud Source Repositories as a remote named origin and clones it into a local Git repository.

Push to the Cloud Source Repository

Go into the local repository you created:


Run the following command to create a file myfile.txt in your local repository:

echo 'Hello World!' > myfile.txt

Commit the file using the following Git commands:

git config --global ""
git config --global "Your Name"
git add myfile.txt
git commit -m "First file using Cloud Source Repositories" myfile.txt

Your output should resemble the following:

Once you’ve committed code to the local repository, add its contents to Cloud Source Repositories using the git push command:

git push origin master

Git pushes the sample application files from the master branch to the origin remote:

Browse files in the Google Cloud Source repository

Use the Google Cloud Source Repositories source code browser to view repository files. You can filter your view to focus on a specific branch, tag, or comment.

Browse the sample files you pushed to the repository by opening the Navigation menu and selecting Source Repositories.

The console shows the files in the master branch at the most recent commit.

View a file in the Google Cloud repository

Click REPO_DEMO > myfile.txt to view the file’s contents in the source code browser:

Click on myfile.txt

Congratulations! We have completed the Introductory lab for Google Cloud Source Repositories.

Happy Learning !!!

Share At:
0 0 votes
Article Rating
Notify of
Oldest Most Voted
Inline Feedbacks
View all comments
Dang k'y binance us
23 days ago

Your point of view caught my eye and was very interesting. Thanks. I have a question for you.
3 months ago

Reading your article helped me a lot, but I still had some doubts at the time, could I ask you for advice? Thanks.

1 year ago

It’s great that you are getting ideas from this
article as well as from our discussion made at
this place.

1 year ago

Ahaa, its pleasant dialogue about this article at this place at
this website, I have read all that, so now me also commenting at this place.

1 year ago

Hi there everyone, it’s my first pay a quick visit at this web page,
and paragraph is in fact fruitful for me, keep up posting such articles.

1 year ago

Amazing! This blog looks just like my old one! It’s on a entirely different topic but it has pretty much the same layout and
design. Great choice of colors!
1 year ago

Howdy! This iss my 1st comment here sso I just wanted to give a quick sout out and tesll you I truly enjoy
reading through your articles. Can you suggest any other blogs/websites/forums that deeal with the same topics?
Appreciate it!
1 year ago

Hello there! I could have sworn I’ve been to this website bsfore
but after browsing thriugh some of the post I realized it’s
new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and
checking back frequently!

1 year ago

Pretty nice post. I just stumbled upon your weblog and wanted to say that I’ve truly enjoyed browsing your blog posts.
In any case I will be subscribing to your feed and I hope you write again very soon!
1 year ago

Hi there, I discovered your web site by way of Google
even as looking for a similar matter, your website got here up, it seems to
be great. I’ve bookmarked it in my google bookmarks.

Hello there, simply changed into alert to your weblog through Google, and found
that it is really informative. I’m gonna watch out for brussels.
I will be grateful in case you proceed this in future.
Numerous other people might be benefited out of your writing.

Feel free to surf to my website –

1 year ago

Hi there, just became aware of your blog through Google, and found that it’s
really informative. I am gonna watch out for brussels. I will appreciate if you continue this in future.
Many people will be benefited from your writing. Cheers!

hemp seed oil capsules

Attractive portion of content. I just stumbled upon your blog and in accession capital to assert that I acquire in fact enjoyed
account your weblog posts. Any way I will be subscribing for your feeds and even I achievement you get admission to consistently rapidly.

Stop by my webpage hemp seed oil capsules

bookmarked!!, I love your site!

Take a look at my web site ::

Excellent way of telling, and pleasant piece of writing to
get information about my presentation topic, which i am going to present in institution of higher education.

my web blog:

1 year ago

Awesome post.

1 year ago

Hi there, for all time i used to check weblog posts here in the
early hours in the break of day, as i like to gain knowledge of more and more.

Good day! This is kind of off topic but I need some help from an established blog.

Is it very difficult to set up your own blog? I’m not very
techincal but I can figure things out pretty fast. I’m thinking about setting up my own but I’m not sure where to start.
Do you have any ideas or suggestions? Thanks

Here is my webpage;

1 year ago

I’m not that much of a internet reader to be honest but your blogs really nice, keep it up!
I’ll go ahead and bookmark your site to come back later.

Many thanks

If you are going for finest contents like me, simply visit this web site all the time since it offers feature contents,

Also visit my web blog;

1 year ago

Article writing is also a fun, if you be acquainted with after
that you can write or else it is difficult to write.

1 year ago

Useful info. Fortunate me I discovered your site unintentionally, and I’m
surprised why this accident didn’t took place
earlier! I bookmarked it.

1 year ago

Hello there! Do you use Twitter? I’d like to follow you if that would be okay.
I’m undoubtedly enjoying your blog and look forward to new posts.

safe weight loss
1 year ago

Hello. remarkable job. I did not anticipate this.
This is a impressive story. Thanks!

Feel free to surf to my web page; safe weight loss

1 year ago

Thank you for sharing your thoughts. I really appreciate your efforts and I will be waiting for your next write ups thanks once again.

1 year ago

It’s difficult to find knowledgeable people in this particular subject, however, you
seem like you know what you’re talking about! Thanks

best iphone casino app

I read this post completely regarding the comparison of
most recent and preceding technologies, it’s awesome article.

1 year ago

My brother recommended I might like this web site. He was entirely right.
This publish truly made my day. You can not imagine just how a lot time I had spent
for this info! Thanks!

hot webcams
1 year ago

My daughter adopted ɑll the boys’ traits νery soon.

Outstanding quest there. What happened after? Thanks!

my website:

1 year ago

Howdy! This is my 1st comment here so I just wanted to give a quick shout out and tell you I genuinely enjoy reading your posts.
Can you recommend any other blogs/websites/forums
that deal with the same subjects? Thanks a lot!

1 year ago

I every time spent my half an hour to read this blog’s content
all the time along with a cup of coffee.

1 year ago

Ahaa, its nice conversation regarding this piece
of writing here at this website, I have read all that, so at this time
me also commenting at this place.

1 year ago

obviously like your website however you have to take a look
at the spelling on several of your posts.
Many of them are rife with spelling issues and I in finding it very bothersome to tell the truth nevertheless I will certainly come again again.

1 year ago

Superb post however , I was wanting to know if you could write a litte
more on this subject? I’d be very grateful if you could elaborate a little
bit more. Appreciate it!
1 year ago

I love what you guys are up too. This type of clever work and coverage!
Keep up the fantastic works guys I’ve incorporated you guys to
my personal blogroll.

Stop by my homepage

1 year ago

of course like your web site however you need to test
the spelling on several of your posts. A number of them are rife with spelling problems and I to find it very bothersome to
inform the truth nevertheless I’ll definitely come again again.

1 year ago

If you desire to get a good deal from this post then you have to apply such strategies to your won webpage.

1 year ago

It’s a shame you don’t have a donate button! I’d most certainly donate to this brilliant blog!
I guess for now i’ll settle for bookmarking and adding your
RSS feed to my Google account. I look forward to brand new updates
and will share this website with my Facebook group. Chat

1 year ago

It’s actually a great and helpful piece of information. I’m satisfied that you shared this
useful information with us. Please keep us informed like this.
Thanks for sharing.

1 year ago

Howdy are using WordPress for your blog platform?
I’m new to the blog world but I’m trying to get started and set up my own. Do you require any coding expertise
to make your own blog? Any help would be really appreciated!

1 year ago

Thankfulness to my father who stated to me on the topic of this blog, this weblog is actually

1 year ago

I am not positive the place you are getting your info, however great topic.
I must spend some time studying more or understanding more.

Thanks for fantastic information I was looking for
this info for my mission.

1 year ago

I am really loving the theme/design of your website.
Do you ever run into any browser compatibility issues? A couple of my blog
readers have complained about my site not operating correctly in Explorer but looks great in Firefox.
Do you have any tips to help fix this problem?

1 year ago

I’d like to find out more? I’d love to find out more details.

I do agree with aall the ideas you’ve presented in your post.
Theyy are really convincing and will definitely
work. Still, the posts are very short for starters.
Could you please extend them a little from next time?
Thanks foor thee post.

1 year ago

Hi, everything is going well here and ofcourse every one is sharing facts, that’s genuinely good, keep up writing.

1 year ago

Remarkable! Its truly awesome post, I have got much clear idea
about from this post.

1 year ago

Fantastic goods from you, man. I have understand your stuff previous to and you are just extremely excellent.

I really like what you’ve acquired here, really like what you’re saying and the way in which you say
it. You make it enjoyable and you still care for to keep it wise.

I can not wait to read much more from you. This is
really a tremendous web site.

1 year ago

Nice weblog right here! Also your website so much up very fast!
What web host are you the usage of? Can I get your affiliate link to your host?
I desire my site loaded up as quickly as yours lol
1 year ago

Have you ever thought about creating an ebook or guest authoring on other sites?
I have a blog based on the same information you discuss
and would love to have you share some stories/information. I know
my subscribers would enjoy your work. If you’re even remotely interested,
feel free to shoot me an e-mail.

Also visit my web blog –

Back To Top

Contact Us