Skip to content

Latest commit

 

History

History
73 lines (45 loc) · 1.95 KB

README.md

File metadata and controls

73 lines (45 loc) · 1.95 KB

This is a test of how to do git.

This will be put up into a Coda document to document how our devops work.

  1. Step one is init the git repository.

    cd gittest
    git init
    
  2. Add repository to github

    echo "# gitttest" >> README.md
    git init
    git add README.md
    git commit -m "first commit"
    git branch -M main
    git remote add origin https://github.com/appliedrelevance/gitttest.git
    git push -u origin main
    
  3. Next, update the readme file and commit it to local repo.

    git commit -a -m "Make more changes to README".
    
  4. Finally, make more updates to the readme file, and commit and push all these changees to the origin repository main branch.

    git commit -a -m "final commit to initialize the document"
    git push -u origin main
    

That should have created a repository in the github cloud that is synchronized with the local clone of the repository.

Make a change to the existing code.

Making a change to the existing code starts with deciding which ticket to work on. Each ticket has a number in the project sprint board, whether it is in Jira or Coda. Since we are currently using Coda.io, that's what we will use for this example.

  1. If necessary, configure git to merge pulls by default.

    git config --global pull.rebase false
    
  2. Pull the master/main changes down to the local version if necessary.

    git pull
    
  3. I've made changes and committed in the cloud. What happens now if I try to commit these changes?

Forking from a master repository

Fork from the master repository using the GitHub web interface.

Clone from the forked copy (called "origin" by Git) to local desktop. This will add the source of the fork, called "upstream" to the local clone of the repository.

  1. Make changes locally.

  2. Create a branch to to save the local changes to.

  3. Commit to the local branch.

  4. Push to the origin.