Tag: branch

Git new file appears in all branches

I thought a file created on one branch will not appear in any other branches until I merge or rebase the branch? Example: I have two branches: master new_contact_page I checkout the new_contact_page branch. $ git checkout new_contact_page Then I create a new file. $ vi contact_page.html Without doing any Git commands, I switch back […]

git checkout remote branch shows extraneous files?

master branch has these files and folders (simplified): C:\Local\TickZoom\Project>ls file.txt name.txt public public branch is tracking a vendor repository and has been subtree merged as public folder in master branch above. public has three folders only (simplified): C:\Local\TickZoom\Project>ls platform providers www When switching from public to master it behaves correctly. However, when switching from master […]

How can I “splice” two (or more) completely unrelated linear branch ancestries into a new one?

I’m trying to combine two branches each with different root commit into a new, empty branch. This is not the usual merge thing as i don’t want to have the branches combined only in the last commit (in that case, the new branch would have a merge commit and ‘below’ still two seperate histories. The […]

Switching remote to a specific branch

So I understand the value of branching, but one thing is confusing me. I have my local repo. I push changes to a remote, which has a post receive hook set up to write files on a website. So I create a branch (new-branch) to try out something. I edit files, commit, and push to […]

Git pull reverted commits in master?

A colleague, whom we’ll call Aaron, was assigned to renovate a section of a website as a long-term project. He created a new Git branch, called aaron. All his changes were made on this branch. While he was working, I continued to maintain the site as a whole, committing my changes to master. Eventually, Aaron […]

Can't push master branch to git repository with netbeans

I just installed netbeans and connect to my git repository throught ssh. Everything works fine except pushing master branch. Every time I commit some changes on master branch and trying to push branch I get this popup: There were errors during the push. Open output to see more details. and the details are ==[IDE]== Jun […]

Why does git say I am 40 commits ahead when I seem up to date and a push-pull (no files) fixes it?

I switch to master and it says I am ahead by 40 commits: $ git checkout master Switched to branch ‘master’ Your branch is ahead of ‘origin/master’ by 40 commits. But when I then do a pull it says I am up-to-date: $ git pull origin master From https://github.com/dmcouncil/dmWorkflow * branch master -> FETCH_HEAD Already […]

How can I get track of several projects in Git that share common code?

I have developed a website that now has to be cloned for several clients. Each client wants customizations that go beyond visual aspects and cannot be handled by profiles, preferences or something like that. With this scenario, I would like to mantain a master repository in Git with the common code, and then one branch […]

How are git branches imported into mercurial with hg convert?

I have a number of branches in a git repository: david@Panama ~/app: git branch -r origin/HEAD -> origin/master origin/master origin/newButtons origin/newFonts origin/serverView If I try and import this git repo into mercurial: david@Panama ~/: hg convert app … david@Panama ~/app-hg: hg update 388 files updated, 0 files merged, 0 files removed, 0 files unresolved david@Panama […]

Why would my local changes in Git be overwritten by checkout in this circumstance?

Say I have a branch A, and from that I branch B. I make a bunch of changes on A, then checkout B and do a git pull. Now I make a change on B but realize that it should’ve been in A. If I now try to git checkout A, I get “Your local […]

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