Locked learning resources

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

Unlock This Lesson

Locked learning resources

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

Unlock This Lesson

An Example Git Development Workflow

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. To continue your learning journey, check out the Real Python Podcast Episode 179: Improving Your Git Developer Experience in Python with Adam Johnson.

Avatar image for Glenn Lehman

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!
Avatar image for Martin Breuss

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.

Avatar image for Glenn Lehman

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

Avatar image for Martin Breuss

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?

Avatar image for Philip GeLinas

Philip GeLinas on Sept. 25, 2021

Well done! Thank you!

Avatar image for andrewodrain

andrewodrain on March 22, 2023

Excellent! I can use GitHub the way its supposed to be used now! Thank You!

Avatar image for Duane aK

Duane aK on May 2, 2023

Great, I understand Git/GitHub now! Thanks for your hard work.

Avatar image for Jon Nyquist

Jon Nyquist on June 22, 2023

Nice course. Seems GitHub has changed a few things since this course was published, especially around authentification, but most most of the lessons remain valid.

Avatar image for Danadasa Chan

Danadasa Chan on July 26, 2023

Thank you for this clear tutorial! I now have a handle on git basics, and now it’s time to practice.

Avatar image for jarmo2

jarmo2 on March 14, 2025

Thanks for the quick tutorial. Great to get started. The only thing I was missing is how to connect the terminal and github using ssh.

Become a Member to join the conversation.