├── pureevil.txt ├── testpr.txt ├── test - Copy (4).txt ├── evil.txt ├── img ├── 01.png ├── 02.png ├── 03.png └── 04.png ├── test - Copy (3).txt ├── test - Copy.txt ├── test.txt ├── .gitignore ├── test - Copy (2).txt ├── suggestion.md └── goodpractices.md /pureevil.txt: -------------------------------------------------------------------------------- 1 | so many more evil plans -------------------------------------------------------------------------------- /testpr.txt: -------------------------------------------------------------------------------- 1 | Thanks Scott for teaching PRs. -------------------------------------------------------------------------------- /test - Copy (4).txt: -------------------------------------------------------------------------------- 1 | this is all wrong 2 | 3 | new testing here -------------------------------------------------------------------------------- /evil.txt: -------------------------------------------------------------------------------- 1 | These are my evil plans 2 | 3 | we can get all the cheese 4 | -------------------------------------------------------------------------------- /img/01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanselman/learninggit/HEAD/img/01.png -------------------------------------------------------------------------------- /img/02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanselman/learninggit/HEAD/img/02.png -------------------------------------------------------------------------------- /img/03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanselman/learninggit/HEAD/img/03.png -------------------------------------------------------------------------------- /img/04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanselman/learninggit/HEAD/img/04.png -------------------------------------------------------------------------------- /test - Copy (3).txt: -------------------------------------------------------------------------------- 1 | this is all wrong 2 | 3 | new testing here 4 | 5 | hey friends 6 | -------------------------------------------------------------------------------- /test - Copy.txt: -------------------------------------------------------------------------------- 1 | this is all wrong 2 | 3 | new testing here 4 | 5 | here is something that happened after the secret 6 | -------------------------------------------------------------------------------- /test.txt: -------------------------------------------------------------------------------- 1 | this is all RIGHT 2 | 3 | new testing here 4 | 5 | snhg changes! 6 | 7 | do some stuff 8 | 9 | smurfs 10 | 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # This .gitignore file was automatically created by Microsoft(R) Visual Studio. 3 | ################################################################################ 4 | 5 | /.vs 6 | -------------------------------------------------------------------------------- /test - Copy (2).txt: -------------------------------------------------------------------------------- 1 | this is all wrong 2 | 3 | new testing here 4 | test after a secret 5 | Maggie's test! 6 | 7 | I just watched your youtube videos on creating and navigating repositories on GIT and merging local Git repositories with the cloud via Git Hub. Very informative videos on the patch of learning "stick shift" as you put it. 8 | I'm learning/updating my knowledge base and I plan on placing some work on Git Hub soon to continue learning through doing via this collaborative space so your work was a great introduction after Git Hub's internal one. 9 | Thank you for the edutainment, Mr. Hanselman. 10 | No need to merge this XD. 11 | 12 | Thanks for the compliment! 13 | 14 | Of course! - Drew 15 | -------------------------------------------------------------------------------- /suggestion.md: -------------------------------------------------------------------------------- 1 | # Community Contributor - what next 2 | 3 | I (Scott) created two videos explaining Git, and you get to suggest new git topics you would like me to go over. 4 | 5 | ## Git related community suggested subjects 6 | 7 | * Rebase - @kishan, @x__dos 8 | * Resolving - @kishan 9 | * Squash - @shanselman 10 | * Integration with github - @Arnon_danon 11 | * Contributing to an open source the right way - @Arnon_danon 12 | * Discussing your contribution with the open source author - @Arnon_danon 13 | * .gitignore - @Arnon_danon 14 | * GitHub Desktop - @Guiorgy_Potskhishvili 15 | * GitHub vs Gitlab - @Damien_Bafile 16 | * Merge options - @patware 17 | * Ho no! I broke git and lost everything. Fixing git - @patware 18 | 19 | ## My videos 20 | 21 | My (Scott) videos are on Youtube 22 | 23 | 1. [Computer Stuff They Didn't Teach You #4 - Git 101 Basics](https://www.youtube.com/watch?v=WBg9mlpzEYU) 24 | 1. [Computer Stuff They Didn't Teach You #5 - Git Pull Requests explained](https://www.youtube.com/watch?v=Mfz8NQncwiQ) 25 | 26 | ## Other resources 27 | 28 | * Interactive 29 | * [Visualizing Git](http://git-school.github.io/visualizing-git/) 30 | * [Learn Git Branching](https://learngitbranching.js.org/) 31 | 32 | ### Cheat Sheet 33 | 34 | [source](https://www.reddit.com/r/git/comments/5m5fdz/git_cheat_sheet/) ![spite77](https://i.redd.it/8341g68g1v7y.png) 35 | 36 | [source](https://www.reddit.com/r/git/comments/bwwqr3/git_cheat_sheet/) ![TOWEr](https://i.redd.it/rsxblm88vf231.jpg) 37 | -------------------------------------------------------------------------------- /goodpractices.md: -------------------------------------------------------------------------------- 1 | # Git 101 "good practices" for Open Source Software contributions 2 | 3 | ## Disclaimer 4 | Please consider this as a log of my learning process... So if you have any modification or suggestion on how to do it better, please modify this document! so that we all learn! 5 | 6 | ## 1. Syncing a Fork 7 | 8 | After @shanselman kindly removed the secret I carelessly left in his repository (you can watch him here: [Computer Stuff They Didn't Teach You #7](https://www.youtube.com/watch?v=dgOpnebZkRo&t=5s)), my fork was left in an inconsistent state like this: 9 | ![License: MIT](img/01.png) 10 | 11 | So in order to fix it, I had to do a reconciliation between the original repository "shanselman/learninggit" and my forked copy "manuelvalenzuela/learninggit". 12 | 13 | First of all I need to know if my repository has the original repository set as remote source, and if not, I have to set it: 14 | 15 | ```powershell 16 | > git remote add upstream https://github.com/shanselman/learninggit.git 17 | ``` 18 | 19 | ![License: MIT](img/02.png) 20 | 21 | After the remote is configured, I can fetch all the changes from the original repo, then reset the actual head of my fork to point to the head of the upstream and finally push that to my fork in github, using the "dangerous" `--force` parameter. 22 | 23 | ```powershell 24 | > git fetch upstream 25 | > git reset --hard upstream/main 26 | > git push --force 27 | ``` 28 | 29 | ![License: MIT](img/03.png) 30 | 31 | Now you can see my fork "is even" with the original repo :sunglasses: 32 | 33 | ![License: MIT](img/04.png) --------------------------------------------------------------------------------