Updating a local branch from the remote server
Answer:
Assume your local branch is cloned from a remote repository such as github, you might want to apply their updates to your branch from time to time.
To do so, try
# git pull
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
Updating a local branch from the remote server
Answer:
Assume your local branch is cloned from a remote repository such as github, you might want to apply their updates to your branch from time to time.
To do so, try
# git pull
List all git config options
Answer:
To show the current git global options, you can use the command "git config --list"
# git config --list
user.name=John Doe
[email protected]
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=auto
color.ui=true
color.pager=true
..
Stage new and modified files in Git
Answer:
To stage new and modified files so that they will be committed in the future, you can use the simple command:
# git add .
So all the newly created and modified files will be staged.
Revert uncommitted change in Git
Answer:
To revert the changes of a uncommitted file in Git, you need to use the following command:
# git checkout file
Setting up local username and email with git
Answer:
Before you make any changes to a local git repos, it is always recommended to setup you username and email first.
To do so, use the commands below:
# git config --global user.name "John Doe"
# git config --global user.email [email protected]
That's it.