Skip to content

Programming Articles

  • HOME
  • Python
  • JavaScript
  • C/C++
  • Java
  • Terms & Conditions and Privacy Policy
  • About US
Main Menu

Git

Git

How to make the current Git branch a master branch?

Let’s say you have a repository in Git. You made a branch, then did some changes both to the master and to the branch. Then, tens of commits later, you …

How to make the current Git branch a master branch? Learn More
Git

How to compare files from two different branches in git?

In this short article, we’ll talk about the different ways to compare branches: you can compare commits, actual changes, or even a specific file on two branches. git diff can show …

How to compare files from two different branches in git? Learn More
Git

How to replace the master branch in Git, entirely, from another branch?

Sample query: I have two branches in my Git repository: master seotweaks (created originally from master) I created seotweaks with the intention of quickly merging it back into master. However, that was three months ago …

How to replace the master branch in Git, entirely, from another branch? Learn More
Git

How to merge two Git repositories?

If you want to merge project-a into project-b: This method worked pretty well for me, it’s shorter and in my opinion a lot cleaner. In case you want to put project-a into a subdirectory, you …

How to merge two Git repositories? Learn More
Git / SSH

Could not open a connection to your authentication agent: Error resolved

Did You Start ssh-agent? You might need to start ssh-agent before you run the ssh-add command: Note that this will start the agent for msysgit Bash on Windows. If you’re using a different shell or operating …

Could not open a connection to your authentication agent: Error resolved Learn More
Git

How to name and retrieve a stash by name in git?

This is how you do it: Where “my_stash” is the stash name. Some more useful things to know: All the stashes are stored in a stack. Type: This will list down all …

How to name and retrieve a stash by name in git? Learn More
Git

How to remove a file from the last commit in Git?

This is a question of moving the mistakenly committed files back to the staging area from the previous commit, without canceling the changes done to them. This can be done …

How to remove a file from the last commit in Git? Learn More
Git

How to stash a specific file in Git?

Since git 2.13, there is a command to save a specific path to the stash: git stash push <path>. For example: OLD ANSWER: You can do that using git stash –patch (or git stash …

How to stash a specific file in Git? Learn More
Git

When to use Git rebase instead of Git merge?

Short Version Merge takes all the changes in one branch and merges them into another branch in one commit. Rebase says I want the point at which I branched to …

When to use Git rebase instead of Git merge? Learn More
Git

How to cache HTTPS credentials for pushing commits?

This article explains how to save HTTPS credentials for pushing commits or in other words, permanently authenticating to git repositories. Since Git 1.7.9 (released 2012), there is a neat mechanism …

How to cache HTTPS credentials for pushing commits? Learn More
Git

How to download a specific tag with Git?

will give you the whole repository. After the clone, you can list the tags with $ git tag -l and then checkout a specific tag: Even better, checkout and create a branch …

How to download a specific tag with Git? Learn More
Git

What is the difference between `git merge` and `git merge –no-ff`?

The –no-ff flag prevents git merge from executing a “fast-forward” if it detects that your current HEAD is an ancestor of the commit you’re trying to merge. A fast-forward is when, instead of constructing a merge …

What is the difference between `git merge` and `git merge –no-ff`? Learn More
Git

.gitignore exclude folder but include specific subfolder

Query explained: I have the folder application/ which I add to the .gitignore. Inside the application/ folder is the folder application/language/gr. How can I include this folder? I’ve tried this with no luck. How to exclude …

.gitignore exclude folder but include specific subfolder Learn More
Git

‘src refspec master does not match any’ when pushing commits in Git

Sample problem: I clone my repository with: But after I change some files and add and commit them, I want to push them to the server: But the error I get back is: ‘src …

‘src refspec master does not match any’ when pushing commits in Git Learn More
Git

How to stash only one file in Git?

Query: How can I stash only one of the multiple changed files on my branch? How to stash only one file in Git? To stash only one file out of …

How to stash only one file in Git? Learn More
Git / How To

How to move uncommitted work to a new branch in Git?

Query: I started some work on a new feature and after coding for a bit, I decided this feature should be on its own branch. How do I move the …

How to move uncommitted work to a new branch in Git? Learn More
Git

How to remove a submodule in Git?

Query: How do I remove a Git submodule? By the way, is there a reason I can’t simply do git submodule rm whatever ? How to remove a submodule in Git? Answer …

How to remove a submodule in Git? Learn More

Posts navigation

1 2 Next

Featured Posts

From UNIX to Linux – History of Linux

21st November 202010th September 2022

Best themes for Ubuntu: Make Ubuntu Beautiful

20th October 202010th September 2022

Strings in Python

12th September 202010th September 2022

Is Python hard to learn? Top best learning resources

18th April 202010th September 2022

Recent posts

  • How to pad a string with zeroes to the left?
  • What is the difference between process and thread?
  • How to generate a random alpha-numeric string in Java?
  • How to auto-resize an image to fit a ‘div’ container?
  • How to get a Docker container’s IP address from the host?
  • How to display a JavaScript object?
Copyright © 2023 Programming Articles.
Powered by WordPress and HitMag.