Find the commit hash you want to go back to by git log --oneline
and then
git reset <commit_hash>
git reset
without a --hard
or --soft
moves your HEAD to point to the specified commit, without changing any files.
Find the commit hash you want to go back to by git log --oneline
and then
git reset <commit_hash>
git reset
without a --hard
or --soft
moves your HEAD to point to the specified commit, without changing any files.
If you see the bellow error for the first time when you try to push your new branch which has not been pushed:
git push
fatal: The current branch new-branch has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin new-branch
const formatedTimestamp = ()=> {
const d = new Date()
const date = d.toISOString().split('T')[0];
const time = d.toTimeString().split(' ')[0].replace(/:/g, '-');
return `${date} ${time}`
}
{
"editor.fontSize": 13,
"editor.lineHeight": 24,
alias c='clear' | |
alias gs='git status' | |
alias pull='git pull' | |
alias push='git push' | |
alias master='git checkout master' | |
alias commit='git commit -m' | |
alias ll='ls -la' | |
alias ls='ls --color=auto' |
const validCreditCard = (cardNumber) => { | |
const newInput = cardNumber.toString(); | |
let first = 0; | |
let second = 0; | |
if (newInput.length !== 16) { | |
return false; | |
} | |
for (let i = 15; i >= 0; i--) { | |
if (i % 2 === 1) { |