Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

This lesson is for members only. Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set the default subtitles language in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.

An Example Git Development Workflow

Give Feedback

This lesson is a summary of everything you have learned in this course. You’ll see an example development workflow that makes use of all the git commands you learned up to this point.

charliem22 on June 5, 2019

Excellent introduction. Would have liked a rebasing example but I understand why the complexities of that would make that a bit difficult. Also, pointer to Pro-Git is appreciated. Have started reading it and it’s definitely the ‘next step’ after this video intro. Thanks for your time and effort… charlie

Paul Mealus on June 5, 2019

I very much appreciate the feedback @charliem22. For those looking for the next steps, pro git is a fantastic resource as Charlie mentioned. If you’re looking for some scenario based learning I’d suggest Learn Git Branching which will run you through some advanced scenarios including rebases and making sense of branch spaghetti.

Github also has some free labs, but I’ve never used them, would be interested to hear if anybody has.

Jet on June 12, 2019

The GitHub learning labs are very useful. If you are learning coding by yourself and trying to work with GitHub, it is difficult because you have no ‘team’ working with you on a project. The labs work with bots and you will go through examples of how it would be to work with someone in the same repo, pushing changes, making merge requests etc. The downside is that if you do something that is not anticipated by the lab, you get stuck somewhere and cannot finish it. I had to delete the repo I created for one of the learning labs in order to start from scratch and go through the entire lab. Still, I guess no matter how many tutorials or labs you go through, you will only really get a grip on it by working with it on a daily basis. You will however pick up useful information. The RealPython tutorials and videos are very good and cover quite a bit of detail. Thanks for that!

ulhasbhagwat on June 12, 2019

one more video on how to get back deleted file(s) as well as re-setting the master back to earlier version would help!

Abby Jones on June 24, 2019

Excellent refresher. Been out of the game, so this was very informative and concise.

LJIN Lab on Aug. 25, 2019

Great tutorial as always, but would have liked to see how to migrate from a local repo to a remote github repo.

mdroberts on Nov. 18, 2019

Very good and succinct tutorial!

Erikton Konomi on Jan. 6, 2020

Nice and concise overview of git!

Lokman on Jan. 13, 2020

Thanks for the easy and short tutorial. Love it!

Damian on Feb. 24, 2020

This tutorial is a gem. While simple, it really demystifies the basic of github. thanks a lot. What do you recommend as a follow up course to continue building on this basics?

Thanks again!

Ricky White RP Team on Feb. 24, 2020

Hi @Damian. If you are new to git, then I recommend practice more than anything, before digging deeper. If you’re not new, then you could dig into the official docs and find a few gems in there that might help your workflow. git-scm.com/doc

pshapard on April 8, 2020

Just completed the video. This course plugged some holes in my git/github knowledge. Still a lot to learn. Software development does not seem so scary. Thanks for your help Paul. Onto the next video

fjavanderspek on April 17, 2020

Clear and concise, awesome!

Patrick Prince on May 22, 2020

Hey Paul, very well done. Thanks for your effort on this. Maybe as a revision add a lesson the github client? Cheers!

Mark on June 5, 2020

Thanks So Much Paul

Kasidis Satangmongkol on June 15, 2020

Many thanks Paul !!

theeternalstudent on June 24, 2020

Thanks for stepping through this! I was able to work with a remote BitBucket repository a teammate had setup. Before this video I simply copied the files. Now I know how to interact properly at the most basic level with a remote repository.

Alan ODannel on July 16, 2020

Very nice refresher course. I’ll be pulling down the Pro Git soon. The checkout and branches cleared a few things up for me.

mahlenius on July 21, 2020

Excellent tutorial Paul, thank you for your work on this. For some reason, I keep getting errors when I tried to do a “git clone https://…” to my private repo. It would respond with a fatal error. When I recreated the repo as a public one, it worked. I was using the same creds each time. Will have to go back and revisit this one as for some of my work projects I cannot make them public. Thanks again!

John Kinder on Sept. 1, 2020

Thanks for this wonderful tutorial. Each topic was short but concise, and I was able to pull all the real python material down to my VM… much appreciated!

jamesbrown68 on Sept. 24, 2020

You’ve got a friendly relaxed style, which was refreshing. Thanks for the info. I still don’t see how multiple developers can work on the same project without unknowingly stepping on each other’s work, but I’ll download the ProGit book and see if I can learn by doing.

anindo78 on Nov. 2, 2020

Thanks Paul! Very good beginner level introduction to Git and Github!

horacionesman on Dec. 29, 2020

Very helpful, it was the explanantion I needed to fully understand this topic. Thanks!

jeffersongarciaor on Feb. 10, 2021

Thanks Paul! I learned a lot, and finally I can understand the git workflow. Very helpful and you were very instructive.

Antonio Soares on June 30, 2021

Git has intimidated me for quite some time but I’ve always wanted to learn how to use it. Although there are quite a lot of things you could have added to the course I think it’s wise that you kept it to these bare essentials. I felt it gave me enough of a base to stand on and learn as I go.

Glenn Lehman on July 8, 2021

Excellent Work!

I really need the foundation I have tried for a few months to grasp the core concepts need to work with git.

Remaining Questions
  1. You used gitBash since I live in the windows world I have used git to this point. Are there benifits to using the gitBash instead?
  2. When I pulled the zen_remote report the .gitignore file did not come over. Is that normal behavior? Do I need a local .gitignore if I have on in the remote repo?
Thanks in advance!

Martin Breuss RP Team on July 9, 2021

Hi @Glenn Lehmann, glad you found the course helpful. :) About your remaining questions:

Git Bash

I’m not entirely sure I understood your question. If you’re on Windows, like Paul is, then you’ve probably already used Git Bash, unless you’ve been working with a GUI tool for Git.

Here’s a description of Git Bash:

Git Bash is an application for Microsoft Windows environments which provides an emulation layer for a Git command line experience. Bash is an acronym for Bourne Again Shell. A shell is a terminal application used to interface with an operating system through written commands. Bash is a popular default shell on Linux and macOS. Git Bash is a package that installs Bash, some common bash utilities, and Git on a Windows operating system.

So, if you’re on Windows and you’ve followed along with this course and typed Git commands in your shell, then you’re already using Git Bash. It comes with the installation for Windows, or you can get it together with a GUI client in a Git for Windows package.

The .gitignore File

You can commit a .gitignore file to version control and to your remote repository. Generally, this is recommended, so that collaborators know which files you excluded. However, you can also add the .gitignore file to your .gitignore file, which effectively prevents it from being recorded in your VCS.

I’m not sure where you pulled the zen_report from, but if you didn’t get a .gitignore file, then it’s because it wasn’t commited to that repository.

You can have a local .gitignore file, or you can get it as part of a remote repo, when you pull it to your computer. It just depends on whether or not the file was committed to the repository.

Hope that helps clearing up things.

Glenn Lehman on July 10, 2021

Thanks @Martin Breuss

GitBash

I did a little more research and found a few minor differences. From the Windows PowerShell if I run the Git command everything works fine as far as Git is concerned.

Since I have never used Unix I have not used the Bash editor. As GitBash appears to not only include the git command line, but also a bash emulator for windows. So you can edit files and a few other bash type items.

In my case since I do not us the VM editor, I can do everything I need with Git.

.gitignore

I actually create a new repo on GitHub and allow the .gitignore file to be create automatically. When I cloned the repo to my local drive the .gitignore file was not brought over to my local directory.

Glenn

Martin Breuss RP Team on July 12, 2021

Hi @Glenn Lehman – gotcha about Git Bash :) Looks like you won’t need it then.

.gitignore

I’ve tried the steps that you described and initialized a new empty repository on GitHub with the suggested .gitignore file by checking the ✅ Add .gitignore option.

Then I pulled the repo to my local machine and looked at the content of the folder. The auto-generated .gitignore file showed up:

➜  Desktop git clone https://github.com/martin-martin/ignoremetest.git
Cloning into 'ignoremetest'...
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (2/2), done.
Receiving objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
➜  Desktop cd ignoremetest 
➜  ignoremetest git:(main) ls -al
total 8
drwxr-xr-x   4 martin  staff   128 Jul 12 09:33 .
drwx------+ 32 martin  staff  1024 Jul 12 09:33 ..
drwxr-xr-x  12 martin  staff   384 Jul 12 09:33 .git
-rw-r--r--   1 martin  staff  1799 Jul 12 09:33 .gitignore

It’s a hidden file, so maybe you need to adapt your folder settings to display hidden files?

Become a Member to join the conversation.