version control - Git, and moving between development machines -


i have github account , have been pushing stuff there months. don't know how use git, hasn't been problem since 1 working on project. (i thought getting account start experience version control...)

anyhow, work desktop go travelling need laptop working.

a few months ago same thing went laptop, got connected github, , cloned repository. that's did though, since trip got cancelled.

after reading around web today went laptop , did git pull origin master. seemed going ok, halted saying local changes overwritten merge, listing files. happy overwrite these changes, i'm not sure how it.

basically, date have been issuing following commands desktop:

git add . git commit - m 'my message here' git push origin master 

i able to:

  • pull code down laptop , modify it
  • push changes github
  • pull changes down desktop (where return travels!)
  • (repeat above whenever travel again...)

ideally i'd able exclude files being tracked (e.g. htaccess) since depend on machine using. (this not imperative though, since can manually them , restore them...)

can make easy me? have read several tutorials online none dealing exact scenario, , different...

  • "i happy overwrite these changes, i'm not sure how it."

    git reset --hard git pull origin master 
  • you can use git in new computer same way in old computer.

  • "ideally i'd able exclude files being tracked..."

create .gitignore in same directory , put names of files exclude in it.

if you're using windows, how create .gitignore file


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -