Git
- Commands
- git-init – Create an empty Git repository or reinitialize an existing one
- git-clone – Clone a repository into a new directory
- git-fetch – Download objects and refs from another repository
- git-status – Show the working tree status
- git-pull – Fetch from and integrate with another repository or a local branch
- git-remote – Manage set of tracked repositories
- Tasks
Commands
git-init – Create an empty Git repository or reinitialize an existing one
If you have a project directory that is currently not under version control and you want to start controlling it with Git, in the dir:
git init
git-clone – Clone a repository into a new directory
Clone locally the latest version of the repository:
git clone https://github.com/LinearTapeFileSystem/ltfs.git
git-fetch – Download objects and refs from another repository
git fetch
will update the list of changes
git-status – Show the working tree status
git status
will check the status of the repo
(Without the fetch first, you will not see remote changes)
git-pull – Fetch from and integrate with another repository or a local branch
git pull
will pull the latest changes
Infos: https://git-scm.com/docs
git-remote – Manage set of tracked repositories
To get a list of the current remotes:
git remote
Add and remove:
git remote add remote_git_repo ssh://git@localhost/leo/my-project.git
git remote remove
Tasks
Remove files from git control
git rm --cached ansible/test.yml
Then add said files to .gitignore
Documentation: https://git-scm.com/docs/gitignore