The Journey Begins . . .

This week began Week 3 of my quest to learn about programming and how to become a web developer. Not knowing a great deal about this world, (my last programming experience was in college with BASIC language), I was/am cautiously optimistic about learning what I need to know to make this a viable career for me in the very near future.

Since a career in web development and programming requires your work to be seen, I have been working to master Git so I can easily post my assignments and projects to begin developing my portfolio.

The First Time

Create a repository

The first time you use Git, it can be a little daunting as far as what goes where. These are some of the more common commands you ned to be familiar with when you began your first project.

Before you commit anything to Git, you first have to create a repository, which is a place where your project is organized.

From the terminal (in the directory you want to commit):

git init  //Initializes an empty Git repository//

Staging

The next step will be staging, which tells what files need to be committed. Any time changes are made to your project, you have to stage and commit so they get added to your repository.

git add .

Commit

The final step is committing the staged files into the repository.

git commit -m "comments about commit"

Create branches

By creating branches, you can work and experiment with your work without affecting the main file in your repository, or master.

git checkout -b <branch name>

Pushing a branch to repository

Once you have done some work on the branch, you need to create the branch in the repository.

git push origin <branch name>

From here, through GitHub, you can create a Pull Request and Merge pull request, which will merge your changes into the master branch. At this point, you can be seen and reviewed by others.

I am still working on figuring out what commands go where, but as I continue working on my assignments and practicing using Git and GitHub, I am beginning to get more comfortable in using the different commands and placing my work in the right place.