Thursday, June 28, 2012

GIT Reference

I am getting absolutely tired of trying to find my GIT references again after I have found them and used them and for some reason I am unable to remember certain commands with git. I am going to use this post as a central location for all of the GIT references that I find with a short description of the command/section that I found useful there.

When creating a branch here are the steps that you want to follow:
1) First we need to create the remote branch so we have a place for us to start. We can do that with the following command:
git push origin [current-branch]:refs/heads/[branch-name]
So for example let's say that I wanted to create a new branch called bill-fix but I don't want to start at the master branch, I want to start at say our new-ui branch. So then my command would look like this:
git push origin new-ui:refs/heads/bill-fix
You can see the logic of the push command, in this example.

2) Next, we need to checkout this newly created branch so we can start work on it. This is the command for that:
git checkout --track -b [branch-name] origin/[branch-name]
So, this command is also pretty self explanatory. The first [branch-name] that appears is the name that you want your local branch to be, and the second has to be the same as the remote branch created. So using the example above, my new branch was named bill-fix but lets say that I want my local branch to be bill-fixed-everything but I want it to track the remote branch of bill-fix, then my command would look like this:
git checkout --track -b bill-fix-everything origin/bill-fix



The above steps will create a remote branch and then a local branch that you can edit that will track the newly created remote branch. There is also a way that you can create a local branch that is not remote so that way only you can see that branch. For more information about that please go to this site: http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging
This site also provides a good explanation about how git branches work so if you are confused about that please read it there.

Saturday, June 23, 2012

One computer, multiple networks

Now, this is a problem that I have been facing for a few years now. Let me sum it up for you. I am a former network administrator for my mom's business. Being the network administrator I completely overhauled the entire network and replaced the server a few years back. With these improvements we wanted to be able to access the internet, but only from a couple of computers. So the objective was to have to client computers connect to two separate networks, one that was just for the business and another one that was connected to the internet. When all was said and done I had one computer that was working just fine and was able to connect to both networks without any difficulty, but the second one would not do this no matter what I tried. After years of having this problem I finally found this forum topic:

http://www.velocityreviews.com/forums/t297470-wireless-and-wired-network-together-on-windows-xp.html

After reading this post I remembered everything that I learned in my networking class about how computers/routers prioritize routes. I wish I had more information but this is definitely something that I need to keep in mind for future endeavors and if anybody else is having the same problem I hope that it will help you too.