So I have switched from SVN to Git and I am very happy about it. When I am at work I am stuck using SVN and I hate it. So I learned about a command that git has called git svn. It allows me to clone an SVN repo and locally use Git for it. I can make my commits and keep things versioned via Git. When I am done I can then commit it to the SVN repo and nobody would know I used Git instead of SVN. What is nice is it will commit all the changes, not just one massive one. I have yet to run into and issue but that’s ok if I do. So if you are a Git user stuck in an SVN world, then this is the way to save yourself. Let me show you an example of how to use this.
git svn clone "urlToSVNrepository"
git svn clone "http://svn.google.com/sampleTest"
git svn clone "urlToSVNrepository" -T trunk -b branches -t tags
git svn clone "http://svn.google.com/sampleTest" -T trunk -b branches -t tags
So now you have your svn project using git, which is nice. What also is nice is your project no longer has a bunch of .svn folders like you see in SVN land. That should be one of many things that will make you want to do this. I will make tutorial video on this soon so stay tuned if you are interested.
I would like to take an opportunity to show you an example of how to developer a simple php contact page. I will not use css or anything like that for this tutorial. Just quick and dirty using the php mail function. Lets watch a video, explaining the process
Version control is something that a lot of developers use. I have been using SVN for the longest time and ignoring Git. I found it confusing and I just left it alone. I did the same thing before I started to use SVN. I thought I would have learned by now. So take a look at the video below and I will also put the steps at the end of the post.
On where the master git server will be hosted
git --bare init
Now lets go to your computer
**Create a README file or you can type:
git add .
git commit -m "Some message"
git remote add origin username@yourservername:somerepo.git
git push origin master
Now this setup is just using the users that are already on the server. You can setup that you do not need to type in password. You can create just a git user. I hope that this tutorial has helped.
If you have used SVN in the past in the Windows world, you are probably pretty use too TortoiseSVN. It is a nice tool that integrates itself into the Windows shell. In the Linux world you probably were using the command line to do these things. Hey I understand I was doing that on my work computer when it was running Linux. I have something in Linux that will get rid of this. RabbitVCS is a client that integrates itself into Nautilus. It is pretty close to being a clone to Tortoise and I really like it.
So as doing automation as my everyday job I find myself in the Eclipse IDE all day. Now there are lots of advantages of using Eclipse but I hate that it is so slow. One day I got so frustrated that I decided to try using my favorite editor TextMate, to do my job. So I thought I would discuss both applications and what I like and disliked. Please post comments or reply to me on twitter with your comments.
This is a very popular tool that a lot over developers use for Java programming. It has a lot of features to autocomplete method names. Code refactoring is another nice tool that it has. If you are working with Maven and TestNG it is also supported as well. The two biggest issues with Eclipse is that it is slow and a big resource hog. Other than that it is not that bad.
This is a popular text editor for the Mac. With its bundle support it is a very nice tool to use. TextMate does have bundles that cover Maven and some TestNG. The issues that I come up with is that autocomplete is limited in TextMate. If I am referencing a page object and I want to call a method of that page object, there is no autocomplete for that. This is the biggest reason why I have trouble using TextMate as my editor for Selenium code. I like TextMate cause it is small and is not a resource hog.Again if I am missing something with TextMate, please let me know. I would love to be able to get rid of Eclipse all together.
One of the things that a lot of people over look when coding is adding comments to it. Everyone should comment their code and there is no reason why you do not need comments. Even if you are writing something for your own use you still should comment on that code. Here are a few reasons why you should comment:
- Makes reading code easier.
- Helps someone understand your code when they are new or have not read it recently.
- It shows that you understand the standards of coding
Commenting is one thing that I myself find that I lack but I work on it to make sure its there. I am not stating that you have to comment every line but you should try to keep it to every 4 to 5 lines. Be brief in your comments and get to the point. So look at your code and see if there are comments there. If not you should start to add some. I hope this helps.
I wanted to get into showing you the basics of TextMate . If you talk to a lot of Apple users and ask them what is the best text editor they will say TextMate. At first I said wow paying for a text editor and I wish I did not do that. If you want to see more go ahead and view their site or click the watch video button below.
You can see TextMate in action here .