Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,839 members, 7,810,227 topics. Date: Saturday, 27 April 2024 at 01:02 AM

Tech Guys Help Me Understand Git - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Tech Guys Help Me Understand Git (1094 Views)

Programming Help Me Understand Prefectly The Importance Of Law To Humanity / Programming Help Me Understand Prefectly The Importance Of Law To Humanity / Programming Help Me Understand Prefectly The Importance Of Law To Humanity (2) (3) (4)

(1) (Reply) (Go Down)

Tech Guys Help Me Understand Git by FrankLampard: 12:23pm On Jul 15, 2016
Computer A pushes a project to Git origin master,

Computer B clones the same Project to his local machine,

Computer B now made some changes to his own code. But did not do anything (Push or Update)

Computer A now added some new files and made some changes to the master in git,

How can Computer B get an updated version of the code from the master.

If you can provide me with sample code snippet, I will be grateful.

Thank you.
Re: Tech Guys Help Me Understand Git by Nobody: 1:02pm On Jul 15, 2016
git pull origin master - This should work. Will fetch and merge the changes from remote repo to your local repo.

EDIT: Run the command on Computer B.

2 Likes

Re: Tech Guys Help Me Understand Git by Bassie(m): 1:09pm On Jul 15, 2016
Hi @FrankLampard,

git pull origin master - would get the updates from the master branch(Assuming that's the "branch" you two are working on) unto the local repository

As an unrelated addition,

If you would love to check first if a branch you tracking is ahead or behind your local repository,

git remote update
git status -uno

Hope it helps

1 Like 1 Share

Re: Tech Guys Help Me Understand Git by Chimanet(m): 1:19pm On Jul 15, 2016
@op, there is no short cut to git. Git, is a tool you have to spend your time with to master. How about picking a free eBook or a YouTube video and learn.

You can even sacrifice a whole day to get the basic then with time you master it. Git is very important that you are really not employable on the international level without you knowing how to use it these days. So bro, it is worth the sacrifice.

It initially looks hard but over time you will find it very easy to work with. One more thing, as you are learning git, learn from the terminal first before transitioning to your ide git features.

Thanks
Re: Tech Guys Help Me Understand Git by maekhel(m): 1:34pm On Jul 15, 2016
git pull origin master will do it.


Take a look at https://www.atlassian.com/git to understand more about git
Re: Tech Guys Help Me Understand Git by sisqology(m): 2:22am On Jul 16, 2016
Just use one of their UI apps (maybe sourceTree) and pull, then merge(if u have done any changes on computer B)
Re: Tech Guys Help Me Understand Git by Chimanet(m): 4:04am On Jul 16, 2016
Why is everyone giving fish to the op here, instead of teaching him how to catch fish?

(1) (Reply)

Kjava Developer Needed / Can A Vast Qbasic Programmer Do This? / How Do I Develop An Instructional Software For Teaching Database?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 12
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.