Search

Nalezeno "git": 44

How to Get the Current Branch Name with git


Most developers spoil themselves with fun command line utilities to make their work easier and more efficient. One such command line helper allows developers to always show the git branch in the command line. How can you get the current branch? With this handy snippet: git branch --show-current...

git Force Push


Rebasing is a frequent task for anyone using git. We sometimes use rebasing to branch our code from the last changes or even just to drop commits from a branch. Oftentimes when trying to push after a rebase, you’ll see something like the following: hint: Updates were rejected because the...

Git: Switching Unstaged Changes to a New Branch


I’m always on the wrong branch. I’m either on master or main working on something that should be on a fix or feature branch. Or I’m on the last branch I was working on and should have cut a new … Git: Switching Unstaged Changes to a New Branch originally published...

More Awesome Git Aliases


In the last article in this series, Awesome Git Aliases, we took a look at some awesome aliases for Git. However, the true power of Git aliases comes from writing custom scripts. These allow you to build Git commands that can do anything you can imagine. In this article, I’ll show you how...

How to Flatten git Commits


One of my least favorite tasks as a software engineer is resolving merge conflicts. A simple rebase is a frequent occurrence but the rare massive conflict is inevitable when many engineers work in a single codebase. One thing that helps me deal with large rebases with many merge conflicts...

Using the Reflog to Restore Lost Commits


This article is part of our “Advanced Git” series. Be sure to follow us on Twitter or sign up for our newsletter to hear about future articles! The “Reflog” is one of Git’s lesser-known features—but one that can be extremely … The post Using the Reflog to Restore Lost Commits appeared first...

Cherry-Picking Commits in Git


In part 5 of this series, we looked at rebasing and merging. Although there are a couple of differences between git merge and git rebase, both commands have the same goal: they integrate changes from one branch into another. The post Cherry-Picking Commits in Git appeared first on CSS-Tricks....

Interactive Rebase: Clean up your Commit History


Interactive Rebase is the Swiss Army knife of Git commands: lots of use cases and lots of possibilities! It's really a great addition to any developer's tool chain, because it lets you revise your local commit history—before you share your work with the rest of the team. Let's see what you can...

Rebase vs. Merge: Integrating Changes in Git


This article is part of our “Advanced Git” series. Be sure to follow us on Twitter or sign up for our newsletter to hear about the next articles! Most developers understand that it’s important to use branches in Git. In … The post Rebase vs. Merge: Integrating Changes in Git appeared...

Merge Conflicts: What They Are and How to Deal with Them​


Merge conflicts... Nobody likes them. Some of us even fear them. But they are a fact of life when you're working with Git, especially when you're teaming up with other developers. In most cases, merge conflicts aren't as scary as you might think. In this fourth part of our “Advanced Git” series...

Better Collaboration With Pull Requests


This article is part of our “Advanced Git” series. Be sure to follow us on Twitter or sign up for our newsletter to hear about the next articles! In this third installment of our “Advanced Git” series, we’ll look at … The post Better Collaboration With Pull Requests appeared first...

Branching Strategies in Git


In this article I'm going to talk about branching strategies and different types of Git branches. I’m also going to introduce you to two common branching workflows: Git Flow and GitHub Flow. The post Branching Strategies in Git appeared first on CSS-Tricks. You can support CSS-Tricks by being...

Creating the Perfect Commit in Git


A commit can be something that helps us stay on top of things. It can be a container for related changes that belong to one and only one topic, and thereby make it easier for us to understand what happened. In this post, we’re talking about what it takes to produce the "perfect" commit. The post...

Microsoft Calls For An End To 'Git Gud'


Before the weekend, Microsoft’s Xbox Twitter account sent a surprisingly important tweet: “Beating the game on the lowest difficulty is still beating the game.” This was then followed up by Double Fine who added that completing Psychonauts 2 with the “invincibility toggle on” still counts...

Awesome Git Aliases


Git is an amazingly powerful tool. It can keep track of all the code you write, let you organize your work into different branches, help you seamlessly work with other developers, and even let you time travel and make changes. But wouldn’t it be awesome if Git could do more? What if you could...

How to Install a NPM Module from GitHub Branch


In my journey to work more quickly with a project containing loads of dependencies, I’ve come across a few techniques I’ve not needed to use before. I previously wrote about How to Push to a Git Remote Branch of a Different Name — this time we’ll talk about installing...

How to Push to a Git Remote Branch of a Different Name


Git is one of those tools that I’ve always known just enough about to be dangerous, and usually tend to learn new skills when I’m in a position to truly need them. Shockingly enough it has taken me roughly 15 years of using git for me to encounter the need to push to a remote...

git: Remove Untracked Files


I’ve always said that I know just enough about git to get the job done, but also do something destructive. Nothing embodies that more than my recent mistake. I somehow found a git repository full of untracked files and git stash wouldn’t fix it. Desperation led me to learning how...

Detect Changed Files with git


There are numerous reasons to want to know which files have been added or modified in a git repository, one of which is your text editor highlighting those files. Another use case is running tasks against only files which are presently changed, like lint or other validation routines. So how can...

Nahoru
Tento web používá k poskytování služeb a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tímto souhlasíte. Další informace