Tag: git branch

problem with commit message after conflicts been resolved when merge

I am new in Git. Currently, I am experiencing this scenario: Step 0. I am working on a sub-branch Step 1. I have added & commited file1, file2, file3 on my sub-branch with commit message msg1, msg2, msg3 respectively. Step 2. I checkout master to switch to master branch Step 3. I pull origin master […]

Move develop changes to a new feature branch

For my project I use git-flow. I have master and develop branch synchronized with remote-repo Usually for all changes I create a feature branch, edit the files, commit the changes on the feature branch and close the branch with a merge in develop. But sometimes I forget to create a feature branch and I edit […]

Efficient project architecture with git

Firstly, let me introduce general architecture of a project. It is hierarchical. We develop server application for our customers. It is stored on main server. Say, local server 1, local server 2, …, local server n are the servers (main application instances) in different companies. Each company has one local server. Mostly all local servers […]

What happen to Git tags pointing to a removed commit

Say I do the following: Create branch X Create Tag t (to branch X) Push Remove branch X What happen to tag t? is it just floating there? is it considered as garbage? Should I remove all tags pointing at branch before removing the branch itself? Reference From Git Basics – Tagging: Git uses two […]

Git: can't switch to new remote branch

I have an account on github and I use it from two different machines. On one, I created a new branch myNewBranch and switched to it. Then I did my modifications to my code, I committed and pushed to myNewBranch. On the second machine, I can’t figure out how to push to it. $ git […]

Is there any harm letting a git branch “grow old”?

So I’ve heard of the branch-per-feature workflow using Git, and I’ve also read some reasons why this could be a bad idea. My real question is this – if I’m developing just a small feature (like a simple regex time parser), after merging this branch back into the trunk, what happens (or should happen) to […]

How to rename a git branch locally and remotely?

This question already has an answer here: Rename master branch for both local and remote Git repositories 13 answers

In Git, how can I list all files that exist in branch A that do not exist in branch B

Is there a Git command I can use that will list the names of all files that exist in one branch that do not exist in another branch? Background: Someone deleted some history and then pushed origin/master. Some team members have been saying they are missing some files. I think I have recovered the missing […]

“modified: Gemfile.lock”, Why?

When I ‘git status‘ on my sub branch, I frequently see “modified: Gemfile.lock“, BUT I have never touch this file, why git always tell me it is modified?? I am developing Rails 3 application under Ubuntu machine.

How to combine multiple commits in to one without losing history

I have multiple commits in one branch. When I push these commits for code review, our code review tool creates one review for each commit. To avoid this I want to merge multiple commits to a single commit. At the same time I don’t want to lose the history of commits. Is it possible to […]

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