Tag: git branch

'git: : number expected' error coming when doing git branch

I am in my local git repository and when I am doing: ‘git branch‘, then the error coming up is: “git:960: number expected”. The number keeps increasing by 1 every time I run the git branch command. Actually, the issue is coming with all git commands, like: git status, etc. Please help me with this.

Upon $ Git checkout branchName, all changes (committed or not/ staged or not) appear on branch switched

Git / branch weird behavior Recently, I had to recover my computer and reinstalled ALL software again. Git is behaving in a manner I am not familiar with. I did $ git init $ git branch -b newBranch $ git checkout newBranch After this I did some changes to a couple of files and added […]

git merge two branches line by line interactively

I want to merge two branches, git thinks there is no conflict however it is. So I want to merge the two branches interactively line by line preferably with emacs ediff, however other tools should be ok. I am really new to git, so please be verbose.

Does github keep deleted remote branches in history? If so, can those be restored?

I was wondering if there is a way to restore a remote deleted branch in github. History clearly keeps record of the branch and merges with other branches but I’m not sure if it’s possible to restore a deleted branch. Thanks.

how to create a branch locally from another local branch in git extensions

I’m new to using Git, currently I’m using Git Extensions V2.48, I’m trying to create a local branch where I can make changes without effecting my current network branch. Currently I have checkout a remote branch ABC123 and I want to create an another new local branch with this ABC123 so I can work on […]

How to get the revision hash of the last push to a branch?

I am looking for the step by step commands to be run. Assuming that the required branch may not yet be present in my local repository, and my workspace could be pointing to another branch, what set of commands should I run, so that I get only the minimum required data. Should I try to […]

Git – Unable to merge after updating index to assume local files as unchanged

I marked a local file as unchanged by updating the index, using: git update-index –assume-unchanged <file1> Though, file1 is present in the remote repository. Now when I’m trying to merge a remote branch by: git checkout myBranch git merge origin/myRemoteBranch I get an error which says: error: Your local changes to the following files would […]

Git merge between 2 branches: is parents order relevant for later merges?

Let’s say I have 2 branches: master and feature, where master represents the stable main stream. Now I want to bring new fixes from master into my feature branch. In the past we tried to merge from master into feature branch but this workflow caused some problems of changes being reverted later on when integrating […]

List all remote branches that are behind master

I have a garbage of feature branch in central repository apart from master. My master is up to date. Now, I want to know the list of branches that are lagging behind my master branch. I know individual branch selection in github/bitbucket has a graphical view. But, here I have 50 to 60 feature branches […]

How to Upload last version to branch on GitHub

Hello I am trying to learn how to use github but could not find an answer to my question. I have a project on my project_edits branch. After I formatted my pc I created a folder an cloned my project that is on project_edits branch to that folder. I deleted that version and copied there […]

Git Baby is a git and github fan, let's start git clone.