Skip to content

amb-costa/gabs.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

gabs.py

Small tutorial for Gabs

For Git teaching purposes

Small code on Python so we can fork and merge

First of all, are your credentials in VS Code already set?

1.- Check your data by writing on the terminal:

$ git config --global --list #email and name will appear together
$ git config --global user.email #exclusively for email
$ git config --global user.name #exclusively for username

2.- Do you have corrections to make? Change your email and username so they match your Github info, and your repo gets updated on every commit:

$ git config --global user.email yournew@email.com
$ git config --global user.name yournewgoodname
$ git add
$ git commit #add -m "message here" if you wanna add a message
$ git push
$ git pull
  • Make sure you got GitHub Pull Request and Issues extension on VS Code, as well

Let's fork!

  • Click Fork on this page and create your own fork off this repo

  • Once it's ready, enter VS Code and press Control + Shift + P. Then, select Git: Clone and find your fork. Select a folder to store the files, and should be ready to go

  • Try making some changes on the testing.py file and then commit them:

$ git add . #adds every file
$ git commit -m "your message here"
$ git push

Keep in mind, these changes are staged to your own repo! not the main one

Wanna try merging?

  • First, make sure there are no changes made before you try, and solve any issues that may appear:
$ git pull
  • If there's issues, you will have to solve them using the merge editor
  • You won't be able to instantly merge because of this repo' settings. Instead, go to Pull Request and make one, I'll look into it and accept the merge if everything is cool. Then, your commits will appear on the main branch!
  • Keep in mind, you might have to sync changes in your fork. Check your fork and clic Sync Fork if that's the case, and make changes to your code if neccessary

Any doubts? You can always check the Git Documentation on Branches to find more info, or the set up Git page on GitHub Docs. Here's a list on 10 Git tutorials for beginners, and here's a specific page for Learning Git Branching.

Happy commit!

About

Small tutorial for Gabs, with a small Python code. For Git teaching purposes, on commit, push/pull and merge

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages