Hands on: Modifying the sources

Now that we know how to use git, we can start modifying the sources. In order to preserve the master branch (the one used when you update your git tree) we're gonna create a new one. Let's call it test. To do this, we just issue:

$ git-checkout -b test

A new branch called test will be created and you'll be switched to this branch.

Now we can edit any file. Do whatever addition, deletion, whatever you want to do with your tree. It's your branch anyway. After you finish, we can check what've we done with our tree. Issue:

$ git-status

To see which files we've modified/added/removed and also issue:

$ git-diff

To get a diff of your changes.

Now, that we've checked everything (it's compiling, it's what we want to do) we have to add files to the commit-ish:

$ git-add " file1 file2 ... fileN

And after that we run:

$ git-commit --author "My Name " -s

This will start commiting the changes to the current branch. It will open your default text editor for you to edit the commit message. Always use this format:

Small description of what are you doing

Big/detailed description of your changes, what are you implementing,
are you correcting a bug? which bug? how did you test it?
On which architectures did you test it?

Signed-off-by: My Name myemail@mydomain.com

VN:F [1.9.0_1079]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.0_1079]
Rating: 0 (from 0 votes)

Leave a Reply