Skip to content

Helpful Git Commands

jpimbert edited this page Aug 24, 2013 · 5 revisions

Orphan branch

In the VBAToolkit repository, the publication branch is an orphan one. This means that there is no parent relationship between publication and other branches, including master. So the publication branch may stay simple. publication and master are both tagged with publication version numbers. The publication branch contains the VBAToolKit.xlam in the Delivery folder, and Documentation in the dedicated folder. Images for the Wiki are in the Images subfolder of Documentation folder.

An orphan branch was created with the command git checkout --orphan publication.


Keep local modification when switching between branches

If you are working on a branch, and you want to commit your local modifications to another branch, you can switch to this new branch and simultaneously merge your local modifications in it with git checkout --merge publication.


Return to a version

  1. Clone the project to local directory if he don't exist , ou if you have a problem with git GUI.
  2. cd.." project directory"

  3. choose the 'sha' commit that you wanna to delete it .
  4. tape this command ## git revert sha -n
  5. +- the update will be maded on local repository.
  6. push code to server ## git push
  7. commit change ## git comit -m 'the message without space' -a

Git useful commands

  • git status to get change maded
  • git commit -m "message without space" -a commit change and index files
  • git push publish the new version

Remove commit

  1. git reset --hard HEAD~1
  2. git push -f

Clone this wiki locally