-
git init
-
git status
-
git add .
-
git commit
-
combining the commands >> git add. | git commit -m 'started project with readme' 156 git show 157 git checkout master 158 git checkout master 159 git branch mikhail1 160 git branch mikhail2 161 git branch mikhail3 162 git branch 163 # git branch name - create new branch without switching to it 164 # git checkout -b name - creates new branch with switching to it 165 # git branch - shows all the branches 166 # git checkout name - switching to a different branch 167 history | tail -10 168 history | tail 169 history 170 history | tail -15 >> README.md
- basic
- github exercises
- some bullet points here
text body
- local
- create a git repository: create a folder, initialize git (tracking) ''' git init
git add. git commit -m 'meaningdule message that summirezes your changes'
get set-upstream origin url git push
cat >> .gitignore data/ mynotes.txt
git push
- Branching
- git branch # list all existing branches
- git branch newbranch # create a new branch and not switching
- git checkout - b newbranch # creating and switching to new branch
- git checkout branch # switching to existing branch
- Working with github
- git clone url.git # clone brand new project from the cloud
- git push # publish the changes from your local to cloud
- git pull # get the updates from cloud repository
- clone the repository from asotools ''' git clone cd newrepo git checkout -b 'yourbranch' '''
- make changes in your repository, local changes.
- Go to your github account, create a new repository to save YOUR changes
- Get the URL of that repositry from GitHub
- Set the your branch upstream to your GitHub repository that you just created. ''' git push --set-upstream '''
- To get the updated from asotoolsny repository, switch to master branch and then git push ''' git checkout master git pull '''
- To get new changes from updated master to your branch: ''' git rebase master ''' testing pull command