Can You Use Git Without GitHub?

Can you use Git without GitHub?

The short answer is yes, you can. Git is a tool for revision control. GitHub is an online service that allows you to store, manage, and share Git repositories in the cloud. You can use Git with online services other than GitHub, with an in-house server, or on your local computer without any server at all.

First, let’s look at what Git is. Then, let’s see what GitHub and other Git-hosting services have to offer.

What Is Git?

Git is a revision control tool. It’s most often associated with software development, but you can use it to track changes in any file. For example, Git has gained a lot of traction as a tool for managing system configuration and software deployment via infrastructure-as-code best practices.Whether you decide to share your code with a team via a server or use it to manage your code locally, your Git repository looks the same. So, that’s why you can use Git without GitHub: Git works as a standalone tool or with a server.

Because of its distributed nature, Git is different from most other version-control systems. All computers that share a set of files (a repository, in Git terminology) have a complete set of files and changes. So, whether you decide to share your code with a team via a server or use it to manage your code locally, your repository looks the same.

So, that’s why you can use Git without GitHub: Git works as a standalone tool or with a server.

Let’s talk about Git’s version-control features.

What Is Revision Control?

The purpose of revision control is to track changes to files, make it easy to see those changes, and provide an easy way for you to shift from one revision to another.

Let’s look at a typical workflow using Git terminology. These examples will use Git on a Unix system, but the concepts apply to any system that supports Git.

Create a Git Repository

To track a file, you need to put it in a repository:

$ mkdir git_test
$ cd git_test
$ git init
Initialized empty Git repository in /Users/egoebelbecker/git_test/.git/

The git init command creates a repository in the current directory.

$ touch test.txt
$ git add test.txt
$ git commit -m "Initial commit" .
[master (root-commit) 7e33531] Initial commit
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 test.txt

Touch created an empty file.

Git add test.txt added the file to the repository.

But the change wasn’t applied to the repository until git commit. This is an important concept; Git doesn’t track changes until you commit them. This initial commit has a revision ID of 7e33531.

Commit a Change to Git

Now, change the file.

$ echo foo > test.txt
$ cat test.txt
$ git commit -m "Added foo" test.txt
[master a6beff0] Added foo
 1 file changed, 1 insertion(+)

After adding some text to the file, commit added the change to the repository. The new revision ID is a6beff0.

Compare Files With Git

Now, you can compare the two commits with their IDs:

$ git diff 7e33531 a6beff0
diff --git a/test.txt b/test.txt
index e69de29..257cc56 100644
--- a/test.txt
+++ b/test.txt
@@ -0,0 +1 @@

The output shows the file being added and then modified. Don’t worry; you don’t have to learn to read the diff—many tools can read it for you (but you can learn it if you want, too).

Finally, move to a previous revision with checkout:

$ git checkout 7e33531
Note: switching to '7e33531'.

You are in 'detached HEAD' state. You can look around, make experimental
changes, and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c 

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 7e33531 Initial commit
$ cat test.txt

Passing the previous revision ID to git checkout changes the current working directory to that state.

Git’s default behavior, when you move back like this, is to warn you that you are in a “detached head” state. It also gives you instructions on how to turn the warning off. The warning means that you and your repository are no longer in sync. This isn’t a problem if you’re aware of it.

The HEAD that Git warns you about is a pointer to the last commit in your current branch. The warning also hints that you might want to work in a new branch instead of a detached head.

A branch is a set of changes. When you create a repository, it has one branch, the master or “trunk.” You can start a new branch at any point in an existing one. Branches can be merged.

Branching allows you to work on multiple versions of your code at a time without conflicts. For example, one branch can be for bug fixes to the release in current production, while another is for working on new features. You (or your team) can work in separate branches without causing conflicts. Later, the branches can be merged, and if there are any conflicts, you can sort them out then.

How and why to use branches is a deep and sometimes controversial topic.

This overview of Git is only the tip of the iceberg. Git has many other features for managing source code, such as tagging and pull requests.

Distributed Version Control

A Git server provides remote storage for a Git repository. You push and pull changes to your repo. For an individual developer, a Git server acts as a backup, and an online service like GitHub is an off-site backup.

For a team, a Git server is a coordination point for code changes. One developer may work on bugs on a “production” branch and push their changes when it’s time to release a fix. Another might work on new features on a “development” branch.

GitHub repository
A GitHub repository. Image credit:

When a set of features is ready for release, the developer working on the features creates a pull request that lists the changes required to merge to production. The team reviews the changes, and they are merged (or not).

That’s an oversimplified example, but it demonstrates how distributed revision control provides teams with tools for managing code.

GitHub is an online Git service. It provides all of the features of a Git server, as well as many others. And GitHub isn’t the only service. Two of its main competitors are Bitbucket and GitLab; both offer online Git servers and their own set of value-added features.

Git Without Github? It’s up to You

Git is the most widely used revision-control tool for many reasons. It’s a powerful tool that works on all major operating systems that look the same to developers whether they’re working alone or with a team via a Git server.

GitHub is a popular online service that’s become synonymous with open source and Git. Many public and private projects host their code there to use Git and GitHub’s collaboration tools.

But while you can’t use GitHub without Git, you certainly can use Git without GitHub.

This post was written by Eric Goebelbecker. Eric has worked in the financial markets in New York City for 25 years, developing infrastructure for market data and financial information exchange (FIX) protocol networks. He loves to talk about what makes teams effective (or not so effective!).

How Long Does It Take to Learn Python?

How long does it take to learn Python?

Well, how long is a piece of string? How much peanut butter is too much? Is this glass half-empty or half-full?

None of these questions has one correct answer. The answer to each depends on your opinion and your goals. And how long it takes you to learn Python depends on what you want to create with the language.

So, while I can’t tell you how long it will take to learn Python, I can give you deeper insight into the language and how it will suit your needs.

What Do You Need to Learn Python?

Python is a general-purpose language. You can use it for automating tasks such as backing up your computer, starting and stopping programs, and sending emails. It’s also good for web applications and trading stocks, currencies, or bonds.

Python supports both structured and object-oriented programming. That means that you can write your programs using two very different approaches—in the same language.

So, before you can determine how long it will take to learn Python, you need to define what you want to learn. Will learning the language’s syntax and basic constructs be enough? Or do you need to learn one of its specialized libraries like statistics, robotics, or science?

The real question isn’t “How long does it take to learn Python?” It’s “How long does it take to learn how to code for” whatever you’re trying to do.

Let’s take a quick look at the language and how it compares to others.
Continue reading “How Long Does It Take to Learn Python?”

7 Tips for Beginner Programmers

You’re just starting out as a programmer, so you’re looking for some tips on how to get started.

Maybe you’ve landed your first job. Or you’ve just finished school. Perhaps you’ve done what many of us before you (including me) did and simply said “I’m a programmer!” and got to work. Either way, congratulations!

Here are a few tips for beginner programmers that will help get you on your way to a new career.

There’s No Substitute for Getting Your Hands Dirty

You can read hundreds of books. You can watch thousands of hours of YouTube. But nothing makes you a better programmer than, well, programming. Stop preparing and start writing code that solves problems.

This practical experience needs to involve both of those activities, though.

Writing code is important, of course. Your goal is fluency: the ability to write code without having to think about writing code. You want to think in code. This comes from repetition. From putting finger to keyboard and cursor to editor.

Tips for beginner programmers: Your goal is fluency: the ability to write code without having to think about writing code. You want to think in code. This comes from repetition. From putting finger to keyboard and cursor to editor.

But problem-solving is just as important. Code kata and basic exercises do a lot to create fluency, but taking real-world problems and translating them into code is the critical skill you need to develop.

So, here’s the first of my tips for you beginner programmers: Find real problems and write code to solve them. Write a replacement for the ls command. Create a simple video game with your favorite language. Take a task that would benefit from automation and write something to address it.
Continue reading “7 Tips for Beginner Programmers”

Lessons From a Veteran: Dawid Ziolkowski on Trusting and Taking the Plunge

This post is part of a series interviewing veteran developers, asking them questions about their journey to tech mastery and sharing the advice they have for those getting started.

Dawid ZiolkowskiToday we’re talking to Dawid Ziolkowski. Dawid has 10 years of experience. At the beginning, he worked as a network/system engineer, did DevOps in between, and recently became a cloud-native engineer. He’s worked for an IT outsourcing company, a research institute, telco, a hosting company, and a consultancy company, so he’s gathered a lot of knowledge from different perspectives. Nowadays, he’s helping companies move to cloud and/or redesign their infrastructure for a more cloud-native approach.

If you’re considering a career switch to programming or questioning whether you’re in the right field, Dawid has some great insights for you based on his own experience. Let’s hear what he has to say.

Basic logistics: Stack? How long have you been doing it?

So, the answer to what stack I use is not straightforward. For most of my career, I was a system engineer involved with DevOps. My first programming experience was with Python. As a DevOps engineer, from time to time I had to write smaller or bigger scripts. And the more experience and different jobs I got, the more programming I did.

For a long time, I was able to more or less understand and write small programs/scripts in Python. After a few years, I decided to finally properly learn at least one language. I decided to go for JavaScript. I made that decision partially because I wasn’t really a fan of Python and partially because I wanted to learn a bit of front-end development.

After learning the solid basics of JavaScript, I learned Angular.js and Vue.js. I enjoyed building front ends, so later on decided to learn the back end, too. Now I know Node.js and Ruby. So, for a little bit more than two years now, I think I can call myself a full stack developer.
Continue reading “Lessons From a Veteran: Dawid Ziolkowski on Trusting and Taking the Plunge”

What Is a Programming Framework?

One of the reasons that learning to program might feel like an overwhelming task is the sheer number of new words, terms, and expressions you come across. Today, we’re here to make your life easier by explaining one such term: programming frameworks. Specifically, we’re going to tell you everything you need to know in response to the question “what is a programming framework?”

You can think of a programming framework as a tool—or a set of tools—you use to make your life easier when performing common programming tasks. I know that might sound a little vague, but it’s hard to offer a more complete definition without going deeper into the topic. Luckily for you, “going deep into a topic” is our thing here at Make Me a Programmer.

What Is a Programming Framework In Simple Terms?

Here’s my definition of a framework:

A programming framework is a prepackaged set of solutions that solves common development problems.

Why do people use frameworks? We’ll go into that in the next section, but I can say that the No. 1 reason for using a framework is probably saving time. But as you’ll soon see, there are several other benefits you can get by leveraging frameworks.
Continue reading “What Is a Programming Framework?”

Lessons From a Veteran: Turning a Hobby Into a Fulfilling Career

This post is part of a series interviewing veteran developers, asking them questions about their journey to tech mastery and sharing the advice they have for those getting started.

Mauro ChojrinToday we’re talking to Mauro Chojrin. Mauro helps PHP developers hone their craft through his trainings, books, workshops, and other tools. He’s been in the IT industry since 1997 and has held roles such as developer, architect, and leader of technical teams. Mauro also likes to write and vlog.

Mauro is going to tell us about how he got his start in programming, and you may or may not recognize some of the throwback systems he references. While the technology may have changed, you might have had similar inspirations for getting into programming.
Continue reading “Lessons From a Veteran: Turning a Hobby Into a Fulfilling Career”

Best Programming Books for Beginners

What are the best programming books for beginners? This is a broad question. Programmers need a wide variety of skills, and the field you want to work in can have a significant impact on which ones you need. There isn’t one book, or even a list of books, that will teach you everything you need. Some skills can come from books, and some will only come from on-the-job training.

You need books that will improve your knowledge and skills regardless of what type of programming you’re interested in. I’ve put together a list of seven books that will do that for you! These books teach you basic skills that any programmer can use and, more significantly, how programmers need to think.

Let’s dive in.
Continue reading “Best Programming Books for Beginners”

Lessons From a Veteran: Back to School With Michael de Ridder’s Drunk Metaphors

This post is part of a series interviewing veteran developers, asking them questions about their journey to tech mastery and sharing the advice they have for those getting started.

Everyone has a different path in life, and that’s OK! Today we’re talking to Michael de Ridder, who tells us about how getting into programming was accidental, not intentional. And that’s OK, too.

MichaelMichael De Ridder has worked in software development, data visualization, data science, research, consulting, and business analysis across health care, telecommunications, radio and finance. He enjoys the challenge of combining and utilizing the relationships between different domains and technology. A big fan of travel, Michael is a proponent for the benefits of work-life balance, believing that time away from a subject allows creativity to flourish.

Let’s learn from him how even a (perhaps drunken) accident can lead to good things and valuable lessons.

What made you want to go into programming?

That’s a more interesting question than it seems. And it’s as good a time as any to say that I wouldn’t call myself a programmer. I recently heard my résumé described—in a job interview no less—as a drunkard’s journey. When the interviewer said drunkard’s journey, he definitely didn’t mean it as a negative, and in fact I took it as a compliment.
Continue reading “Lessons From a Veteran: Back to School With Michael de Ridder’s Drunk Metaphors”

Lessons From a Veteran: Gabriel Aizcorbe on Unexpected Lessons

This post is part of a series interviewing veteran developers, asking them questions about their journey to tech mastery and sharing the advice they have for those getting started. Today we cover a lot of topics, from whether you should go into programming or IT to being specific about what you set out to learn to the lessons you’ll never learn until you start working.

Gabriel AizcorbeAnd we’re learning about all of these things from Gabriel Aizcorbe. Gabriel got into IT when he received his first 8088 at 14 years old. From then on, his whole life was about computers, programming languages, and learning more. As a project manager with PMP and agile methodologies, he gained experience in all kinds of projects in the local and international markets. He has a deep passion for data and analysis and is striving to launch a startup devoted to data manipulation and analysis while he works as DBA/BI consultant.

Let’s hear about the lessons he’s learned on his journey.

Basic logistics: Stack? How long have you been doing it?

I’m a bit of an “un-stacked” person—more a “free soul,” if you will. I prefer to mix my own tools as I need to in order to achieve a goal. But, if I had to associate myself with a stack, based on the tools I use the most I would say  Microsoft stack. Either way, I have enough flexibility to change to a MEAN stack or whatever else comes along. In the end, they are still development tools.

And since when? Well, I started self-teaching when I was 14 years old. But let’s say that, formally, my first big development job was at 25. So I’ve been working for more than 20 years.
Continue reading “Lessons From a Veteran: Gabriel Aizcorbe on Unexpected Lessons”

What Languages Should Every Programmer Know?

It’s easy to get lost in the sea of programming languages. On top of that, there are some languages (I’m looking at you, JavaScript) that have a vast ecosystem of frameworks. Wikipedia has an exhaustive list of programming languages with several for each letter of the alphabet. I won’t count them, but there are at least 260 at a glance. There’s no way you can learn all of them. So, what languages should every programmer know?

Where to Start?

If you want to know where to start, you can take a few approaches. Of course, this depends on what you want to do in your programming career.

What languages should every programmer know?

If you want to build games, you should learn some common gaming languages (and platforms, too). For mobile app development, you would focus more on the languages used for iOS and Android development. Is data analytics your thing? It’s pretty hot right now! And if it is, you’ll want to learn data-centric languages, plus some languages that specialize in data analysis like R.

See what I mean when I say it depends on what you want to do? But if you don’t quite know where to begin, you might look at the markets. Are you interested in learning to code because it has a good job market? If that’s your game, then you might consider using the markets as your guide.

Two points to consider:

  1. The markets are always changing.
  2. Some languages are in demand because knowledge of those languages is uncommon.

Also, you can ask around. Of course, if you ask five different people, you’ll get five different answers. But, you can always take the ones that are mentioned more frequently and start there. I’ll share my own list and see what others have to say on the topic, too!
Continue reading “What Languages Should Every Programmer Know?”