I'm new to using git with teammates and I don't understand the workflow very well yet.
Let's say master branch is ABC.
Since dev1 was working on ABC version of master so, how to continue development on dev1 which depends on previous version of master when master value was changed from ABC to ACCDE.
Added info: I was still working on dev1 so I can't merge dev1 to master yet, and then dev2 which was edited and added with new features was merged into master. The problem is the feature I was working on on dev1 depends on unedited version of master and now the master was changed and I no longer can work on my development on dev1 Thanks
Another option is to merge the current version of master into your branch. You will have to live with those commits eventually, so you might as well merge them into your branch sooner rather than later, to make the merge easier.
Your working branch is dev1. Here is the process I use.
Get the latest version of master
git checkout master
git pull origin master (I like to be specific about what I pull. It keeps my head on straight)
Now that your local copy of master is up to date, merge master into your branch. (This is different than merging your branch into master. You only do that when you are completely done with your branch.)
git checkout dev1
git merge master (If there are conflicts, resolve them as described by Lajos)
If other developers continue to work on master, then you may need to do this periodically. I prefer to merge master into my dev branch frequently so that at the end of developing my branch I don't have a lot of merge conflicts, which can happen if a lot of development has been done on master.