Tag: git branch

Git usage with multiple branches

I’ve been using Git for years but mostly in a single developer scenario. Now I’m working on a project with a team, and I’m not sure of the best practice for this use case: I have a branch (call it feature1) I’ve created to add a feature to the master. The feature1 branch hasn’t been […]

Pull a commit into another branch exactly (without merging)

I have a structure similar to below: C1 — C2 — C3 \ — C4 I want to pull C3 on back on top of C4. (NB: C3 & C3a hold the save files) C1 — C2 — C3 \ — C4 — C3a If I try to merge or pull I am just told […]

Discard Git commits & merge feature branch back to Master

First I worked and made 3 commits on Master branch: Wijzing 1, 2, 3. Then I did checkout… on commit Wijziging 1. Then I created a new branch new-feature and started making changes. Now I want to throw away the 2 commits: Wijzing 2 and Wijziging 3. And I want to merge the new-feature with […]

How to modify previous git branch

I have 3 git branches – Develop, QA and Master. Developers use the Develop branch for all development. Once a task is completed by a developer and the code is committed to the Develop branch, the commit is merged to the QA branch for testing. After testing is complete, the code is merged to the […]

Pushing new branch to remote pushing everything again

I created a new branch develop from master. Then I pushed the new branch to the remote using git push -u origin develop from develop branch. This command took too much time to push the new develop branch. The output is: $ git push -u origin develop Counting objects: 11531, done. Delta compression using up […]

New branch creation in Git using old commits in existing branch

I have a stable point commit/tag b1. Now I want to create another branch, say b2, from that stable commit/tag, and work on it. I am thinking I should do this: $ git checkout b1. $ git fetch –tags $ git checkout tags/my_stable_tag Now create and move this code to new branch b2: $ git […]

Working on multiple git branches that are dependent on each other

I’m maintaining 4 branches of a project on Git with a structure as below. master student teacher authentication The problem is I created “authentication” branch the last and added some code from this branch. Now, I switched to “teacher” branch to continue working on it. However, I need some features I added in the “authentication” […]

how to see branches in my remote origin?

I have two remote origins for my project. I did like this when I already have one origin git remote add github https://github.com/iincube/Commuter.git then my project have two remote origins like this github https://github.com/iincube/Commuter.git (fetch) github https://github.com/iincube/Commuter.git (push) origin https://github.com/iincube/SafetraxApp.git (fetch) origin https://github.com/iincube/SafetraxApp.git (push) now if I am doing $git branch I can see only […]

Why changes in one branch can affect the other branch in git?

I was at master branch, I commit everything then I create a new branch “git checkout -b xxx” then I switch back to master “git checkout master” then I delete everything with master branch without using “git rm” I checkouted to branch xxx, during the branch switching, it shows a long list that every file […]

Git not showing star next to current local branch

I am new to git and have encountered a confusing situation. In summary I am having trouble understanding how case-sensitivity works pertaining to branch names. For example I am on the master branch and create a new branch called AP-1025 with the command git checkout -b AP-1025, now I can do a git branch and […]

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