Posts

Showing posts from March 10, 2018

Developing with Git

Image
Git is a nice tool to keep track of how a software is developed. Even text files. Git can help you with those. Here are some basic commands you can use with git. • git init creates a new Git repository • git status inspects the contents of the working directory and staging area • git add adds files from the working directory to the staging area • git diff shows the difference between the working directory and the staging area • git commit permanently stores file changes from the staging area in the repository • git log shows a list of all previous commits Git workflow Backtracking • git checkout HEAD filename: Discards changes in the working directory. • git reset HEAD filename: Unstages file changes in the staging area. • git reset commit_SHA: Resets to a previous commit in your commit history.  Branching • git branch: Lists all a Git project's branches. • git branch branch_name: Creates a new branch. • git checkout branch_name: Used to switch from one branch to another. • git mer...