Pages

Friday, September 15, 2023

Git tutorial links

 https://www.youtube.com/watch?v=oe21Nlq8GS4

 

https://www.youtube.com/@LearnwithSumit

Tuesday, September 12, 2023

Git

 

Note: The shorthand command for git add --all is git add -A




Git Commit


Since we have finished our work, we are ready move from stage to commit for our repo.

Adding commits keep track of our progress and changes as we work. Git considers each commit change point or "save point". It is a point in the project you can go back to if you find a bug, or want to make a change.

When we commit, we should always include a message.

By adding clear messages to each commit, it is easy for yourself (and others) to see what has changed and when.

 

git status --short

Note: Short status flags are:

  • ?? - Untracked files
  • A - Files added to stage
  • M - Modified files
  • D - Deleted files

 git init -- creates the local repo and initialized git clone link -- creates the clone folder git status -- shows modified files git add -all - add the directory change to stage git add . -- add the specific directory change to stage git add * -- add all files change except delete git add link -- add specific change file git reset -- resets the changes of git add ] git commit m "message" - commit the changes git reset HEAD~ -- reset all commits git branch name -- creates a git branch of the following name git checkout name -- goes to the name branch git branch -- lists all the branch git merge name -- transfer properities of name to directory git push orgin name -- transfer the folder to the online github repo git pull -- git fetch plus merge