Skip to content

Using Git #8

@chinnichaitanya

Description

@chinnichaitanya

Here is essentially what you have to do after you make changes to local repo and want to push:

  1. git add --all
  2. git commit -a -m "Message to use in commit. It should explain changes youve made"
  3. git pull origin master - instead of master, you can have branch_name
  4. git push origin master - instead of master, you can have branch_name

If you get any conflicts, It will mention which files have a conflict, you go to that file and open it. Somewhere, you'll see something like :

<<<<<<<<<< HEAD
_some code which you wrote here_
---------------------------
_some code which others may have written here_
>>>>>>>>>>> 868348347r847r34r6t384r3

You need to remove the <<<<<<<<<< HEAD and the ---------------- and the >>>>>>>>>>> 868348347r847r34r6t384r3 and choose which ever you want to keep. The old code or the new code. If you want some files from old code and some from new, you can delete only specific lines in both.
Basically, what you put here will be exactly how the file will get stored, so be careful not to delete anything important, be careful not to add wrong code.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions