You are on page 1of 2

1.

Create strong passwords and protect them

2. Lock your computer screen

3. Secure your mobile devices from loss

4. Protect data on mobile devices/removable media

5. Identify the URL before you download

6. Use public Wi-Fi safely

7. Think before you post to social media

--------------

------- to revert to a particular commit:


eg.
git revert c748739b4bc328d00e3df41780f8190250c585a2

to show git status without untracked files:


git status -uno
..also equivalent to untracked-files=no

Once 2 files are deleted from myproject, then:


commit

git status will show deleted


now commit..

then put the 2 files in myproject folder

now:
git add .

will show 2 new files, now commit

git log - displays commit history with long commit id

to Revert all files back to a previous commit point:


git revert <commit id>
(we get commit id from git log along with comments)

shows:
This reverts commit 0acc0b9639656ca1563ec267b71554a7c1184025.

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch master
# Changes to be committed:
# deleted: myproject/File 1.txt
# deleted: myproject/File 2.txt
# modified: myproject/My Text.txt
#
# Untracked files:
# LICENSE.txt
# README.portable
# bin/
# cmd/
# dev/
# etc/
# git-bash.exe
# git-cmd.exe
# mingw64/
# txtsample.txt
# usr/

------------------
gitignore is a file that allows you to hide files in your repository:

for eg. secret files that are not to be shared on git.

create a file, .gitignore (document)


enter:
/secrets
passwords.txt

(above means ignore the folder and file)

git add .
shows only 1 file, the gitignore file

You might also like