Git init is a command to start a new repository or reinitialize an existing one. You will need to type this command in the Terminal in the desired directory of your choice to start new repository.
There are options or switches you can add. See the manual.
Once you are done editing, and are through with making file changes in the local working directory, you have the option to commit the changes to the Subversion repository. You simply type the following command from the Terminal to initiate a commit.
svn commit -m "Place your comment here"
I encourage that you add comments, so you’ll know exactly what changes you’ve applied. Going forward, it will be easier to keep track of changes as you apply hundreds of commits to a project.
Years ago, I implemented an alternative style switcher I found at A List Apart. But, that solution is quite old now. It was published eleven years ago, back in 2001. Now, I’m looking for something a little bit more modern, perhaps a solution that uses JQuery. The idea is to let the readers choose a CSS stylesheet of their liking by simply clicking on a link. So, here’s the finished product. Demo.
I’m using two very simple stylesheets. The default stylsheet is called style.css. The alternate stylesheet is called black.css. This code belongs in the head section of the HTML page.
<link rel="stylesheet" type="text/css" href="style.css" title="style" >
<link rel="alternate stylesheet" type="text/css" href="black.css" title="black" >
<a href="#" onclick="setActiveStyleSheet('style');return false;">Default</a> |
<a href="#" onclick="setActiveStyleSheet('black');return false;">Black</a>
Putting It All Together
Here’s the final code.
<link rel=”stylesheet” type=”text/css” href=”style.css” title=”style” />
<link rel=”alternate stylesheet” type=”text/css” href=”black.css” title=”black” />
<a href=”#” onclick=”setActiveStyleSheet(‘style’);return false;”>Default</a> |
<a href=”#” onclick=”setActiveStyleSheet(‘black’);return false;”>Black</a>
Adding a file or directory to Subversion is quite easy. The following commands will add a file and a directory to the current Subversion working directory. The added file or directory is only added to the local working directory, and not to the Subversion repository. For that to happen, you’ll need to issue a Subversion commit to synch the files to the repository. The following commands simply add files and directories in the local working directory.
Add a file
Add a directory
The Subverion Checkout command is used to pull out a working copy of a project from the main Subversion repository. The Checkout command signals the start of using version control. This command is usually performed once at the beginning, but sometimes, it can also be performed whenever there are major changes to a project structure. To perform a checkout, type the following command in the Terminal.
svn co http://repository/project/trunk .
The period at the end is very important.
It tells Subversion that you want a copy of “trunk” in the current directory.