Here are _some_ of the most essential git operations you will need when working as a developer.

🧵🔽
1️⃣ Create A New Repository

This is the most basic command you'll need. When you start a repository locally, your start with git init. # Initialize a new repository git init
2️⃣ Clone A Repository

You can clone a remote repository to get a local copy of it. Your local repository is connected to the remote one so you can pull in changes and push yours to the remote. # Copies the repository from the remote location and links y
3️⃣ Stage Files For Commit

Staging files basically makes them available to be committed later. It's like telling git "Okay, the next time I want to save a bunch of stages, include this file and its changes". # Staging files so you can commit them afterwards # The path
4️⃣ Commit Your Changes

Committing your previously staged files creates a "version" of your repository. It includes all previous changes and the ones added with that specific commit.

You can, from then on, always rewind your repository to this exact state. # Committing files persists all the changes in a "versi
5️⃣ Add A Remote Repository

You can add as many remote repositories as you like to your local repository. Most people only work with one remote repository, but git is actually designed for more. # Adds a remote repository link to your local repository git
6️⃣ Fetch Remote Changes

Fetching pulls in the data from the specified remote repository. It doesn't merge the changes directly into your local branches and keeps them in a separate directory, named after the remote name. # Pulls in all the changes from the remote repository. # It
7️⃣ Fetch And Merge Remote Changes At Once

Pull is a convenience command. It combines fetch and merge and saves you some writing and time. # Pulls changes from the remote repository and merges them i
8️⃣ Create A New Branch

Using checkout together with -b creates a new branch in your local repository. You can commit to it but you still have to push it later. Switch is an experimental alternative. # Creates a new local branch, based on the commit you are cu
9️⃣ Push Your Local Branch

Push is what you need to get your changes to a remote repository. Others can then fetch, merge or pull them into their local versions of the repository. # Pushes the local changes on the branch you currently have
🔟 Switching Branches

You can change the branch you currently work on with either checkout or the experimental switch. # Changes the current branch to the branch specified git che
1️⃣1️⃣ Stashing Changes

Sometimes you want to put your current unstaged changes aside and do something else. This is what stash is for. It's basically a stack where you can put changes atop and pop them off again later. # Stash your current changes git stash  # Get the stashed ch
1️⃣2️⃣ Rename A Branch

Sometimes you'll want to rename a branch. There is, however, a difference in doing this locally and on the remote. This is why you'll need two commands for it. # This renames a branch locally git branch -m <oldBranchName
1️⃣3️⃣ Apply A Commit From One Branch To Another One

Sometimes, you committed a change and want to apply it to another branch, as weell. This is what cherry-pick is for. # Applies the changes from a commit to your currently checke
1️⃣4️⃣ Show Changes

The git log contains a list of all commits in descending order of application. The latest commit sits on top, the oldest commit is the last one on this list. You can use this to find out commit hashes and when someone applied what commit. # Shows all committs in descending order of application to t

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Oliver Jumpertz

Oliver Jumpertz Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @oliverjumpertz

4 Feb
Want to optimize your LinkedIn profile and boost your chance of being contacted by recruiters?

Here are some super effective but still relatively easy to implement tips for you.

🧵⬇️
1️⃣ Optimize Your Headline

Recruiters search for keywords. These do not only apply to your skills but also to your headline.

If you want that new job, add there what you want to do, not what you currently are.
Here is an example:

"Frontend Engineer / 5 years of (professional) experience / TypeScript, React, Next.js, Serverless"

This gives recruiters everything they'd want at first sight. What you are (or want to be), your experience, and some key skills.
Read 16 tweets
4 Feb
Let's take a look at the Jamstack,

the architectural approach that makes your websites faster, safer, cheaper, and all that with a better developer experience.

🧵🔽
1️⃣ What Is It?

The Jamstack is an architectural approach.

The letters "J A M" are an acronym and actually stand for:

▶️ JavaScript
▶️ APIs
▶️ Markup
🟢 JavaScript

JavaScript is the universal runtime of the web. Every browser can handle JavaScript and it's the language that brings interactivity to every modern-day browser.

JavaScript can either be written directly or act as a compile target.
Read 25 tweets
24 Jan
Want to get started with Rust?

Here are some resources that help you getting started.

🧵⬇️
1️⃣ "The Book"

This is the official Rust book. It covers everything the language has to offer and introduces feature after feature while enabling especially newbies to follow along from the simpler to the more difficult topics.

doc.rust-lang.org/book/
2️⃣ Rustlings

This project gives you small exercises that aim at getting you comfortable writing Rust code. Especially if you don't feel creative enough to think of a new project, this is a great way of still writing code.

github.com/rust-lang/rust…
Read 8 tweets
23 Jan
Let's talk about Rust.

The most-loved language, according to StackOverflow's yearly developer survey that not enough people seem to use professionally.

🧵⏬
1️⃣ What Is Rust?

Rust is a systems programming language that is compiled to binary. It has no runtime and instead uses a concept called "borrow checking". Developers don't need to explicitly free memory, the compiler does it for them.
The language itself is multi-paradigm, offering functional, generic, imperative, structured, and concurrent programming with a huge emphasis on performance, memory safety, and developer productivity.
Read 27 tweets
22 Jan
"Do you have any (further) questions?" sounds common to you?

It's one of those questions that is often asked at the end of an interview (stage), and it's one question that you shouldn't answer with "No, not at the moment".

Here is why.

🧵⬇️
1️⃣ Why Is This Question Important At All?

This question gives you a chance and not a small one. You can use this question to show that you actually paid attention to the interview and to clear things up for yourself.
Simply stated:

Before you leave the room (be it virtual or physical), you can give your interviewers a very positive impression. And they will leave the room with exactly this positive impression, going into further internal discussions.
Read 19 tweets
21 Jan
Test-Driven Development

You hear some people talking about it, you might have a basic idea, but let's take a closer look because, in the end, it's not as difficult as it might seem from the outside!

🧵⏬
1️⃣ What Is It?

Test-driven development (short: TDD) is a software development technique.

Instead of writing all your code first and only then writing your tests, you start with tests, then code a little, then test again, and so on.
It is one specific form of the test-first approach and aims at making software development faster, more reliable, and safer to do. And it especially forces developers into a user role.

By writing tests first, you become a user. You are the first one to ...
Read 26 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!