Google Cloud: Introduction to Cloud Source Repositories

Share At:

GCP Development : Managing Source Codes with Google Cloud Source  Repositories

Overview

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:

cd REPO_DEMO

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 user.email "you@example.com"
git config --global user.name "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
Subscribe
Notify of
guest
244 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
Brooks
21 days ago

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

Tyrone
21 days 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.

Liliana
21 days 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.

Johnson
21 days 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!

zenwriting.net
21 days 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!

git.sicom.gov.co
21 days 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!

Hilton
21 days 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!

resultdatasgp.com
21 days 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.
Cheers!

Feel free to surf to my website – resultdatasgp.com

Markus
21 days 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

piaaladunia2018.games
21 days ago

bookmarked!!, I love your site!

Take a look at my web site :: piaaladunia2018.games

https://premiumtraveltips.com/

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: https://premiumtraveltips.com/

Georgia
21 days ago

Awesome post.

Shanel
21 days 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.

https://mochimedia.info/

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; https://mochimedia.info/

Janie
21 days 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

https://prodanceireland.com/

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

Also visit my web blog; https://prodanceireland.com/

Joshua
21 days ago

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

Heather
21 days 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.

Leora
21 days 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
21 days 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

Anh
Anh
21 days 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.

Kali
21 days 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.

Monty
21 days 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
21 days ago

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

http://yildirimajans.net/

Outstanding quest there. What happened after? Thanks!

my website: http://yildirimajans.net/

Rosalie
21 days 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!

Williams
21 days ago

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

Earle
21 days 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.

Betsey
21 days 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.

Rozella
21 days 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!

rumahliga.org
21 days 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 rumahliga.org

Nickolas
21 days 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.

Cooper
21 days ago

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

Ralph
21 days 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
soon!

Thurman
21 days 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.

Carl
21 days 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!

Thelma
21 days ago

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

Rickey
21 days 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.

Verlene
21 days 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?

Kurtis
21 days ago

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

https://www.behance.net/audraalatea

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.

Lovie
21 days ago

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

Leila
21 days ago

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

Alissa
21 days 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.

Elise
21 days 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

https://textly.net/
21 days 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 – https://textly.net/

Oscar
21 days ago

It’s a shame you don’t have a donate button! I’d most certainly donate to this outstanding blog!
I guess for now i’ll settle for book-marking and adding your RSS feed to
my Google account. I look forward to fresh updates and will
talk about this website with my Facebook group.
Chat soon!

Ruby
21 days ago

Excellent post. Keep writing such kind of information on your site.

Im really impressed by your site.
Hi there, You’ve done a fantastic job. I will certainly digg it and in my opinion recommend to my friends.
I’m confident they will be benefited from this web site.

Back To Top

Contact Us