Results: 1580
Notes
  • Newest first
  • Oldest first
  • Newest first(All)
  • Oldest first(All)
Shows current version of Git installed
git --version
by Valeri Tandilashvili
4 years ago
0
Git
Git & GitHub Crash Course For Beginners
1
Remove new files from staging area
git rm --cached new.file
by Valeri Tandilashvili
4 years ago
0
Git
Git & GitHub Crash Course For Beginners
1
Adds all modified and new .html files to staging area (except deleted ones)
git add *.html
by Valeri Tandilashvili
4 years ago
0
Git
Git & GitHub Crash Course For Beginners
1
git add index.*
Adds all types of files with name
index
(except deleted index.* files)
git add index.*
by Valeri Tandilashvili
4 years ago
0
Git
1
Clears previous console info
also works on windows PowerShell
by Valeri Tandilashvili
4 years ago
0
Git
Git & GitHub Crash Course For Beginners
1
git restore --staged
Removes
index.html
file from staging area
git restore --staged index.html
Removes all files from staging area
git restore --staged .
Alternative command is:
git reset HEAD index.html  /  git reset HEAD .
by Valeri Tandilashvili
4 years ago
0
Git
1
Files or folders that we don't want to include, should be inside
.gitignore
file. For example, if we don't want to include any .txt files, any files inside /docs directory, and also any .html files inside /dir, then the file will contain:
*.txt
/docs
/dir/*.html
by Valeri Tandilashvili
4 years ago
0
Git
Git & GitHub Crash Course For Beginners
1
Lists all local branches. Current branch is highlighted (with green color)
git branch
Lists all remote branches
git branch -r
Lists all local and remote branches
git branch -a
Creates new branch
login
to work on login functionality on the branch
git branch login
Shows branches that are merged already
git branch --merged
Deletes the
login
branch
git branch -d login
Deletes the
login
branch (with force mode, which means - the branch will be deleted, even if it's not fully merged
git branch -D login
by Valeri Tandilashvili
4 years ago
0
Git
Git & GitHub Crash Course For Beginners
1
Merge
login
branch into
master
git merge login
Note:
we must be on master branch if we want some other branch to merge on it
by Valeri Tandilashvili
4 years ago
0
Git
Git & GitHub Crash Course For Beginners
1
-u
flag adds a tracking reference to the upstream server that we are pushing to. This lets us do a
git push
without specifying other arguments. For example, once we do a
git push -u origin master
, we can later run
git push
and git will know that we meant
git push origin master
by Valeri Tandilashvili
4 years ago
0
Git
1
Results: 1580