Home / Software Engineering / Git tutorials

Git tutorials

Print Friendly, PDF & Email

For developers, working in a team likes you eat and sleep daily. The question is how do they control different versions of project. In this tutorial, I want to summarize some basic commands of git bash for project version control in a remote programming.

GitHub for Beginners

How to be proficient in GitHub and Git Bash

How undo modifications on a certain file

git branch:

git branch new_branch_name

git checkout

git checkout branch_name

git checkout — file-name

git status

git status -s

git add

git add file1.txt file2.html

git add -A

git commit

git commit -m “add/modify the file xxx”

git pull

git pull –rebase

git push

Pushing is how you transfer commits from your local repository to a remote one. It’s the counterpart to git fetch, but whereas fetching imports commits to local branches, pushing exports commits to remote branches.

git commit

Changing a commit message

If a commit message makes non-sense and might contain unclear, incorrect or sensitive information, you can amend it locally and then push a new commit with a new message to your git repository.

Rewriting the most recent commit message

The most recent commit message can be amended by using the following command:

git commit --amend

 

comments

About Nguyen Vu Ngoc Tung

I love making new professional acquaintances. Don’t hesitate to contact me via nguyenvungoctung@gmail.com if you want to talk about information technology, education, and research on complex networks analysis (i.e., metabolic networks analysis), data analysis, and applications of graph theory.

Specialties: researching and proposing innovative business approaches to organizations, evaluating and consulting about usability engineering, training and employee development, web technologies, software architecture.