r/learnprogramming • • Mar 28 '21

Wow github is actually pretty addicting

I recently made a github to see what all the fuss was about, I also installed WSL and got used to git. I pushed one project onto github and it just felt so satisfying that I went through all my past projects, cleaned them up, and added them. It makes me want to learn more languages and create more ambitious projects just so I can push them and so I can stare at all my repositories lmao.

2.3k Upvotes

139 comments sorted by

View all comments

146

u/[deleted] Mar 28 '21

Wow I never got that feeling. I just push through my IDE and feel like I haven't learned anything about how git should be used in a team environment. I feel like I'm just faking programmer knowledge. I've never restored a previous version of my own code, and I've been pushing updates for a year while I learn.

47

u/dowell_db Mar 28 '21

I've got to agree with you. I've been struggling with trying to use it for months now on my personal projects bc I know it, or something like it) is going to take over the dev team but it's just not clicking. The reflexive functionality I try to utilize, like merging someone's changes into mine, always turns into some mangled mess of obscure terminology. I don't want to be a crotchety old dev with one skill set and no means of improvement. I need to find the high that OP is getting.

30

u/Michael-F-Bryan Mar 28 '21

Something I found quite beneficial when starting out is to read about the different git workflows people use. Understanding what you are trying to achieve and the concepts behind it often helps when deciphering the various magical git incantations.

The GitHub Flow works well for small personal projects where there isn't much work being done concurrently, and GitHub's documentation tends to be fairly approachable.

When I start getting more serious (e.g. working on a team or on a larger project that needs more structure/traceability) I'll follow something like Atlassian's Feature Branch Workflow. This is where each feature is done in its own branch and you'll periodically rebase onto master to pick up recent changes.

Rebasing can be a hard topic to wrap your head around, but the Atlassian article does a fairly good job of explaining it.

18

u/MrCogmor Mar 28 '21

I suggest you make your own guide or cheat sheet for different scenarios so you don't keep getting lost in the same obscure terminology. Improve it gradually over time. (Maybe even keep it as markdown in a practice git repo)

The work itself should help you learn and if you forget then it should be easier for you to understand when put into your own words.

4

u/dowell_db Mar 28 '21

That’s a really good suggestion, thanks! I guess it’s been a while since I’ve picked up something new, I used to do this all the time

26

u/[deleted] Mar 28 '21

I recommend learning to push using the command line. Follow a guide. Then over time its becomes easy and feels natural. And make branches. Definitely experiment with branches and merging. This is where it gets a little complicated but so worth it when you get your head around it. When you stuff up, the learning experience to fix it teaches you so much about how git works.

17

u/Wonder_Momoa Mar 28 '21

Honestly I don't know if I'm learning anything useful or if I'm even doing it right but im having fun. Install windows subsystem for linux and use the git command to push code instead of the IDE, in fact, use the terminal for everything. Linux is just way more fun and convenient to use, with one line you can accomplish so much.

15

u/snailracecar Mar 28 '21

in fact, use the terminal for everything. Linux is just way more fun and convenient to use, with one line you can accomplish so much

I'll tell you, the moment I started to get the idea of the UNIX philosophy, I knew there's no going back. And you don't even have to work as a sysadmin or system programmer to see and use the power.

13

u/Wonder_Momoa Mar 28 '21

Fr, also people see you using a terminal for everything and they think you're a professional hacker-man lol.

6

u/ParkerZA Mar 28 '21

What's the philosophy?

6

u/Smallzfry Mar 28 '21

"Do one thing and do it well" is common. Most classic Unix utilities do a specific task and nothing else, but they're very easy to string together to get more complex tasks done.

2

u/RoguePlanet1 Mar 28 '21

Oh man, don't send me down yet another rabbit hole......

3

u/jantari Mar 28 '21

Why do you use WSL for git instead of just using git on Windows directly?

1

u/fouoifjefoijvnioviow Mar 28 '21

Yea, let's help this guy out

5

u/YouFromAnotherWorld Mar 28 '21

I've been using Git on my own for work. Even tho I'm working alone, I make branches and work as if I had a team. It makes things more interesting and cleaner.

8

u/raf2k07 Mar 28 '21

This but I feel like this for all aspects of programming. Impostor syndrome is a bitch.

3

u/UserNotSpecified Mar 28 '21

Yup, no matter what it is in programming, I always feel like I’m not doing it the right way or that there will always be a more efficient, much less messy way of doing something. Even if I think I’m doing something the right way, I feel like I only know how to program the bare minimum to get what I want out of my program - and in the back of my mind there’s so many other things I’m unaware of that would massively improve my program.

4

u/MeanCommon Mar 28 '21

The first time I use git is with the Eclipse IDE, clicking thru the gui to commit and push. But it is very tedious and non-intuitive. Until I got fed up and decided to install the Git Bash -- and managing git becomes super easy and convenient once you master the basics (plus it has color fonts which I really like)

Definitely recommend using git on command line, feels super different

3

u/hewasnumberoneee Mar 28 '21

Hard to properly use GitHub when working by yourself. It was quite a change when I started my job. Get used to working with branches, resolving conflicts. Git is more than git add ., git commit, and git push

3

u/[deleted] Mar 28 '21

This course has been helping me a ton, really feeling the light bulbs turn on.

If you don't mind paying like $12 for the course on Udemy: https://www.udemy.com/course/git-and-github-bootcamp/

You can search for "udemy coupon codes" with any search engine and find coupons to drop the price of most courses down to about $11-$16 or you can wait for a site wide sale which occurs quite frequently. That Git course has been a pleasant help, indeed.

1

u/alwaysdownvotescats Mar 28 '21

Check out Chingu.io, they setup groups of newbie developers to work on a project together. It helped me get a better feel of using Git in a team environment, before that I'd only pushed to my personal project repos.