Tag: git branch

Git best practice with new database

Question regarding Git best practices. When making a major new version of a project (in my case it’s a Codeigniter project) I am faced with two options: Create a new branch (e.g. branch version2) Create a copy of existing project folder and make it a new git project. Advantage of 1): development may be ongoing […]

Github Merge pull request somehow re-wrote history

At my workplace we commit code by first creating a branch, creating a pull request in our Github repo for that branch, and then someone reviews it and hits “Merge pull request”. It’s a pretty standard workflow. Normally when we hit “Merge pull request” Github creates a new commit called “Merge pull request #1234 from […]

How to delete specific files & folders from newly created git branch in GITLAB dashboard?

I’m a newbie to Git and I’m doing all the Git operations by logging-in at Gitlab URL using the Gitlab dashboard UI and menus. I’m using Ubuntu Linux 12.04 LTS on my local machine. I have no idea about how to use command line for Git operations. So I just created new branch from ‘master‘ […]

'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 Baby is a git and github fan, let's start git clone.