From the course: Git: Branches, Merges, and Remotes
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Push to an updated remote branch
From the course: Git: Branches, Merges, and Remotes
Push to an updated remote branch
- [Instructor] Let's examine what happens when we want to push some local changes up to a remote branch that has been updated by other people. So the scenario would look something like this. We have the remote server and it has three commits on it and we have the local repository on our computer, which also has three commits. Everything is in sync. So then I start work for the day and let's say I spend an hour putting together a commit and I commit it to my local repository. During the time that I was doing my work, my collaborators were also working and they already pushed up their changes to the remote server. Now if I go and try to push my changes to the remote server, it will fail and it's not failing because there's a conflict. It's not as if someone has made two changes to the same line and Git doesn't know how to sort it out. It's because there are new commits there and Git doesn't know what to do with our new commit. Our new commit presumably is supposed to go after f36de. So…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
(Locked)
Push changes to a remote repository5m 21s
-
(Locked)
Fetch changes from a remote repository5m 1s
-
(Locked)
Merge in fetched changes4m 34s
-
(Locked)
Check out remote branches3m 9s
-
(Locked)
Push to an updated remote branch1m 45s
-
(Locked)
Delete a remote branch4m 26s
-
(Locked)
Enable collaboration3m 53s
-
(Locked)
Collaboration workflow7m 6s
-
(Locked)
-