Tag: git branch

Why branch checkout on Windows is so slow, but on Linux so fast?

I got a git repository with several submodules and got horrible performance on my Windows 10 build 15063, while on my Linux Mint 18 Sarah everything is fast as the speed light. Both on Windows and Linux using the Smartgit client, where I can do checkout on a test branch, but takes like 3 minutes […]

Git error about non fast forwarded changes to branch

Right now I have a repo called playGround It has 3 commits recorded My local copy of playGround is behind 1 commit I also have a branch called SecondB which was copied from my local copy of playGround. Then on SecondB I made two changes so SecondB has a total of 4 commits to it. […]

Why doesn't git branch <mybranch> work but git checkout -b <mybranch> work?

As explained in this post git checkout -b <mybranch> runs two commands simultaneously git branch <mybranch> git checkout <mybranch> I created a new git repository with git init. Now When I run git branch development I get the error: Not a valid object name: ‘development’. If I run git checkout newbranch. I get the error: […]

Not able to perform git checkout on local with origin/master

I have a tool which updated my remote origin/master with some changes to my JAVA project. On remote origin/master it deleted a folder and now I’m trying to update my local to test these changes. I tried following commands in my local git pull origin master git fetch origin master & git reset –hard origin […]

Branch concept in svn vs git

I come from a git background so apologies for any gross svn-misconceptions causing this question. In git, when switching between branches, the working copy is always say “adjusted” to reflect the staged files. So e.g. when working in branchA, which incorporates a folder named branchA-folder, and the master branch does not have this folder yet, […]

How should I use the git branches?

New to git. A bit confused about how some of it works, conceptually. So it sounds like, in terms of local work, its a good idea to have a branch that contains only what goes into production and another for testing out ideas, etc. which I can then merge. Is it as simple as creating […]

Can two branches point to the same commit?

I’d like to keep my gh-pages in sync with master on my github repo, and currently I am doing this with a script that generates an extra merge commit each time and in truth I only need a single commit. It’s true that I could simply neglect to update master and just use gh-pages for […]

Working in Git Branch, and then deciding a need a new branch, some files already committed

I know that if I’m working away in a branch I can create a new branch and all my commits will go to the new one. But what if I’m working along, I’ve made some commits, still working, and then realize a need a new branch, including the commits I’ve already made (but not pushed […]

can not get new branch from github

my co-worker has just create a new branch in the git repository which we have been working for a while. but in my local repository, I am having a hard time to get the new branch and merge it into my local repos. I found this post: Only master branch is visible after cloning a […]

Git new branch created — would other users be able to access the same?

I created a new branch in git from my local system using the command: git checkout -b branchname My doubt is whether other users from their system will be able to switch to this new branch? Or do I need to push the changes to the server, then only they can also access it? — […]

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