Tag: git branch

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 […]

empty directory after clone

I searched earlier questions before asking here and found but the proposed solution which worked did not work for me. After clone operation, I see empty folder although it seems that lots of files have been downloaded. git clone git@git.assembla.com:optival.git Cloning into ‘optival’… remote: Counting objects: 611, done. remote: Compressing objects: 100% (468/468), done. remote: […]

Block or restrict Developers to create a branch in GitHub

How to block or restrict Developers to create a branch in GitHub? It should always done by Admin or Administrator of the organisation

Trying to push same branch after it was merged remotely

I pushed my local branch called correction on github. My coworker merged it. Then I made some modification in my local branch correction and tried to push it again on github git push origin correction: Counting objects: 20, done. Delta compression using up to 4 threads. Compressing objects: 100% (19/19), done. Writing objects: 100% (20/20), […]

Push a branch into a newly created Bitbucket repository

I’m currently switching over to using mono repos, since it fits my workflow better. However, I still want to be able to deploy/use parts of the now huge project separately. That is why I came across splitsh-lite (https://github.com/splitsh/lite), a replacement for git subtree. So, my project structure of the main (mono) repository is as follows: […]

How to fast forward a branch to another non-master branch

I am on branch B. When checking out branch A, I get the message that I am behind branch A by one commit. git checkout A Switched to branch ‘A’ Your branch is behind ‘origin/A’ by 1 commit, and can be fast-forwarded. But when on my own branch, I cannot do git pull A because […]

Create Git feature branch from another feature branch

Is there a way in Git to create a Git feature branch (B) from another feature branch (A) but do not keep history from (A) and only display history of changes in B when create a PR?

How can I delete all git branches which have been “Squash and Merge” via GitHub?

Ever since GitHub introduced Squash and Merge, all the cool kids at my workplace are using it when merging pull requests. Is there a way to cleanup “Squash and Merge” branches? The following command from How can I delete all git branches which have been merged? does not work for “Squash and Merge”: git branch […]

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